Page 1 of 1

vectoradd

PostPosted: Sat Oct 18, 2003 9:04 am
by jazz_e_bob
This code:

angle = -(ship.animpos/ship.nframes)*360.0 + 90;
diretional_velocity = shot_speed;

...is in the create actor action for the shot.

It works fine when the ship is standing still.

The problem occurs when the ship travels faster. The bullets come out slower and eventually fall behind the ship.

How do I add the directional velocity of the ship to the shot?

PostPosted: Sun Oct 19, 2003 12:52 am
by makslane
Try this:

angle = ship.angle;
diretional_velocity = ship.diretional_velocity + shot_speed;

PostPosted: Sun Oct 19, 2003 5:42 am
by jazz_e_bob
:oops:

All too easy. Thanks mate.