side scrolling shoot-em up game,
Members - Reputation: 122
Posted 28 August 2001 - 12:50 AM
Moderators - Reputation: 1656
Posted 28 August 2001 - 04:23 PM
y=mx+c won''t work if the two object are right above/below each other for starters...
You need to decide how fast the bullets move, then you set the bullet''s initial position to the position of sprite A, and set the bullet''s direction vector equal to the sprite''s motion vector. Then every frame multiply the bullet''s velocity vector by the elapsed time and add it to it''s position.
Magmai Kai Holmlor
- Not For Rent