Hi all,
How could I program the movement of bullets with
arbitrary pattern?
say, they move straight with different angles and velocities
possible for them to move in curves?
what's the easiest to handle them? as i have to monitor their
movements and collisions with other objects...
Blanc
bullets movement patterns
Moderator: Moderators
The easiest and most realistic way to move bullets in curves is to keep fixed-point velocity and displacement vectors for each bullet. Then each frame perform Euler integration: add accelerations due to force (gravity, wind, etc) to velocity, add velocity to displacement, and take the integer portion of displacement and put it on screen.
Go look up analytic geometry and Newtonian kinematics on Wikipedia if you want some background.
Go look up analytic geometry and Newtonian kinematics on Wikipedia if you want some background.