You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

13 lines
400 B
GDScript

extends CharacterBody2D
var mouse_position = Vector2.ZERO
signal hit()
func _process(delta):
mouse_position = lerp(mouse_position, get_global_mouse_position(), 0.02)
look_at(mouse_position)
#var horse_direction = (mouse_position - horse_instance.position).normalized()
#horse_instance.rotation = horse_direction.angle()
#horse_instance.get_node("Sprite2D").rotation = horse_direction.angle()