hey everybody. I am writing a 3d first person shooter type game using OpenGL. I am having trouble finding an algorithm to calculate the x and z of where the bullet should be. ok, here''s what I have so far.
My bullet data structure
struct tag_bullet
{
int x,y,z;
int counter;
}Bullet, *buller_ptr;
Bullet bullet1;
ok, the x,y, and z should be self explanatory. (the y stays constant because the bullet won''t move up or down, for my purposes)
After each loop of the game the bullet1.counter variable will be incremented by 1. This will represent the movement away from the player that the bullet is moving. I want to use this variable for calculating later. The player has a direction (in degrees 0-360) that he is facing. Let''s say he''s facing 45 degrees. How do I calculate the x and z coordinates of the bullet with this information? Do I need more info to calculate this?
Thanks,
Joe
/ -two increments
/ -one increment
x -the player
JoeMont001@aol.com