Windows Reproduce movement from a game

Hello everyone,

I am play this game
And i wonder how to reproduce the way which the character fly.
She can fly and adjust his trajectory.

I tried a lot of things :
- use motion_add
GML:
if key_left {image_angle += rspeed}
if key_right {image_angle -= rspeed}
if (key_up) {motion_add(image_angle,0.1);}
- gravity_direction

But i can't have a good system.
Can you help me?
 

Kahrabaa

Member
You could use an extra variable that the player's direction moves to.

Code:
if key_left {goalDir+= rspeed}
if key_right {goalDir-= rspeed}
direction + = angle_difference ( goalDir , direction ) * .2; //.2 Would be how fast you rotate towards the new angle
Then control goalDir.
 
Top