Hello, I'm trying to move an object from it's current location to where I click the mouse.
I am using this equation to set direction:
PlayerVX = Cos(3.141592654 * PlayerRotDegrees / 180 )
PlayerVY = Sin(3.141592654 * PlayerRotDegrees / 180 )
then to make it move I use this:
ObjectX = ObjectX+PlayerX*PlayerSpeed
ObjectY = ObjectY+PlayerY*PlayerSpeed
I think the equations to set direction is wrong. I'm getting these equations from a Flash AS3 book, but don't think I'm doing it right.
Anyone know how to do it?