Godot Version
Godot 4.3
Question
I have a 3D model of a turret with three animations:
Rotate: rotates turret one full turn
Elevate: elevates barrel from horizontal to vertical
Recoil: plays a recoil oneshot
I would like to combine these animations. I have an AnimationTree in which I have the three animations combined through ADD2 nodes with add_amount set to 1, so they are all playing properly on the model. The issue is, they all simply play to the end. I need to be able to set the frames on each of the animations, and it’s not clear how I do that.
This could easily be an XY problem; maybe I’m asking the wrong question? My intent here:
- blend/add all the animations
- position the turret by setting the animation frames for rotation and elevation to the appropriate values (eg: set the rotation animation to 0.25 to rotate 90 degrees, set the elevation to max by setting the elevation animation to 1.0)
- play the recoil oneshot on top of the accumulated position
- playback speed on the position animations needs to be 0, which I think I can do by setting speed_scale to 0, if I can figure out where
Assuming I’m doing this properly, I need to be able to find the animations used by the AnimationTree so I can control playback speed.
Ultimately, either I’d like to know how to access the animations feeding the AnimationTree, or if I’m doing this wrong, I’d like to know how to do this correctly. I’d prefer not to have to reach into the models and set bone positions manually.