okay i c.... when i moved the object around it stopped working, but thx for the help...
So next question: Ball.x Ball.y is the current balls x and y positions, What would i do so instead of moving the ball like Ball.x += 0.5 and Ball.y += 0.3,
but moving the ball by msngheading = msngheading += 0.5 so Ball.x and Ball.y move at the angle i specify.
Isnt it something like:
Ball.x += cosf(Angle_in_Radians) * whatever
Ball.y += sinf(Angle_in_Radians * whatever
Is my Distance formula right?
Quote:Original post by Bluseed
Isnt it something like:
Ball.x += cosf(Angle_in_Radians) * whatever
Ball.y += sinf(Angle_in_Radians) * whatever
Yes, where "whatever" is the total distance the object should move...you will probably just want to use the speed of the ball in a simplistic scenerio.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement