Hi
I have a rotating sprite and want to move it forward in the direction relative to the rotation of the sprite
So if it is pointing downleft have the acceleration begin from there...
Also want to accelerate the sprite slowly.
Is there an easy way to do this without mind-numbing math?
Okay I think I have the movement sorted...
Just need a acceleration method...
myship.x =myship.x - (COS(myship.ang) * 2)
myship.y = myship.y + (SIN(myship.ang) * 2)
Where ang = rotosprite value...
:good:
Yeah thats the way to do it. in this calculation '2' is the speed of the spritemovement, if you want to move your sprite faster, just replace the '2' with your speed.
I managed to get a nice acceleration routine done...thnks!!!
Speeds up and slows down gradually...wow - eureka moment! :booze:
DEC myship.x, COS(myship.angle) * myship.speed
INC myship.y, SIN(myship.angle) * myship.speed