Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- export var turn_speed = 2
- onready var temp_rotation = $temp_rotation
- onready var sprite = $Icon
- func _process(delta: float) -> void:
- temp_rotation.look_at(get_global_mouse_position())
- sprite.rotation_degrees = lerp(sprite.rotation_degrees,temp_rotation.rotation_degrees,turn_speed * delta)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement