Godot Version
4.6.2.stable
Question
Piggy backing off of a question I had last week, in which I found the solution, I’m now wondering if this is not a great thing to be doing. The gist of it is that I’m working on a procedural locomotion system that requires retrieving bone transforms after animation is applied, then again after IK is applied.
The mixer_applied() signal notifies when animations are applied.
modification_processed() notifies when a skeleton modifier (in this case leg IK) has been applied.
A simplified version of what I have:
func _ready(): -> void:
animation_player.mixer_applied.connect(_on_animation_player_mixer_applied)
two_bone_ik.modification_processed.connect(_on_two_bone_ik_modification_processed)
func _on_animation_player_mixer_applied() -> void:
_update_body_offset()
_update_ik_target(left_target)
_update_ik_target(right_target)
func _on_two_bone_ik_modification_processed() -> void:
_update_foot_orientation(left_foot)
_update_foot_orientation(right_foot)
And this does work, and even the Godot team’s own example of the skeleton modifier system does something similar. However I’ve been reading that signals are more for one off events, and not so much for ticking every frame. I also require get_physics_process_delta_time() in some of those functions, which just seems like another hint that this isn’t the way to go.
Thoughts?