Godot Version
4.3
Question
I have a body, and legs. Body might switch between animations like idle, run, attack etc. What I wanted to do is for the legs to ignore the mouse position, instead of rotating like the Body is.
How can I achieve this? I’ve tried to to change look_at
to $body.look_at
but that resulted in a wrong rotation and still affected the legs anyway.
Marker2D is under Player (CharacterBody2D), Body (Sprite2D) is under Marker2D and Legs (Sprite2D) are under Body.
Here’s my code for the Marker2D:
extends Marker2D
func _process(delta: float) -> void:
look_at(get_global_mouse_position())
And also Body is using a separate AnimationPlayer, while legs are using AnimationPlayer2