Advertisement

Move a 2D obj with angle?

Started by April 26, 2003 02:04 PM
1 comment, last by mvendramini 21 years, 9 months ago
How can I move an object in a 2D scene using angles? I have the X, Y and Angle values (disregarding the width and height), and I want to know how to calculate the X and Y positions using the relative facing angle of this object, considering that it is moving (like in Gta1).
x+=cos(angle)*spd
y+=sin(angle)*spd
Advertisement
Thank you very much! I never thought it was so easy and short

This topic is closed to new replies.

Advertisement