2D vectors?

Blitz3D Forums/Blitz3D Programming/2D vectors?

gingerprince(Posted 2006) [#1]
If I have an object (2d) at coords OBJECTX,OBJECTY moving at any angle (0 - 360) at velocity `VEL`.
How do I calculate the DELTAX,DELTAY value to add to OBJECTX,OBJECTY coords to allow me to move the object?

cheers!


Stevie G(Posted 2006) [#2]
Like so ...

DELTAX# = VEL# * cos( Angle )
DELTAY# = VEL# * sin( Angle )


Stevie


gingerprince(Posted 2006) [#3]
Thanks for the swift reply Steve....

This may sound odd but.... are pixels equal in size horizontally and vertically?

If not ..... how would you compensate for any difference in size...for the formula you provided above?

Many thanks!


Stevie G(Posted 2006) [#4]
Most screen resolutions have a 4:3 aspect so each pixel should look square. They may not be technically but will to the human eye, at least my eyes ;) I wouldn't worry too much about it to be honest.

Stevie