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
406 B
GDScript
13 lines
406 B
GDScript
2 years ago
|
extends CharacterBody2D
|
||
|
|
||
|
var horse_instance
|
||
|
var mouse_position = Vector2.ZERO
|
||
|
|
||
|
|
||
|
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()
|