B
Big_Macca_101
Guest
Hi guys, I'm working on a top down space exploration game and when using the code bellow I get weird behaviour as seen in the GIF.
Code:
Current behaviour:
Could someone help me change my code to make it so the ship always lerp's towards the mouse cursor instead of having to do a full rotation the other way!
Thanks!
Code:
Code:
dir = point_direction(x, y, device_mouse_x(0), device_mouse_y(0));
if(round(dir) != round(image_angle)) {
image_angle = lerp(image_angle, dir, 0.05);
}
Could someone help me change my code to make it so the ship always lerp's towards the mouse cursor instead of having to do a full rotation the other way!
Thanks!