I’m trying to get the animation state machine from the animation tree in GDExtension so I can control animations from C++. I have the following line of C++ code:
animation_tree->get() returns a variant, and the the animation_state_machine variable is the type AnimationNodeStateMachinePlayback*. How do I get the object out of the Variant so I can put it in a C++ type and call functions like travel() on it normally?