Hi to the best peoples of the world
Want find way to make rotation like this
I maked smooth slow down but can't figure how make smooth rotations
Very glad to a little help , with example if it's possible +_- ,
That's code of player ship movement
func _physics_process(delta):
if !alive: return
var input_vector := Vector2(0, Input.get_axis("move_up", "move_down"))
velocity += input_vector.rotated(rotation)
velocity = velocity.limit_length(max_speed)
if Input.is_action_pressed("rotate_right"):
rotate(deg_to_rad(rotation_speed*delta))
if Input.is_action_pressed("rotate_left"):
rotate(deg_to_rad(-rotation_speed*delta))
#smooth slow down
if input_vector.y == 0:
velocity.x = lerpf(velocity.x, 0, 0.012)
velocity.y= lerpf(velocity.y, 0, 0.012)
move_and_slide()