How can I rotate a bone using Skeletal Controls?

So I’ve got an Animation Blueprint that has a Transform Bone SkelControl that controls a turret bone for a tank. I’ve created a custom C++ class called UTankAnimInstance that has a single property for the turret rotation.

Here is my blueprint graph:

Now this all works great in the preview window. I can change the yaw rotation to see the turret rotate. But when I get the animation instance from code (currently on a Tick), and try to adjust the rotation, the turret bone does not rotate.

Here is the code I am using to get the custom AnimInstance and increment the yaw rotation. This on the Tick function of the Pawn.

UTankAnimInstance* AnimInstance = Cast<UTankAnimInstance>(SK->GetAnimInstance());

Am I supposed to call something to get the turret to update from code after I modify the variable?


So upon further thinking, I realized that I had a body instance setup for the turret which was preventing the AnimInstance from rotating the bone because it was driven from physics. Removing the body instance allows the bone to rotate properly now.


“Removing the body instance allows the bone to rotate properly now.”

As near as I can tell, this thread is resolved

Hi Polygon Byte. I just wanted to make sure you were able to resolve your issue. If you still need any help, there was a thread on the forums dealing with something similar. If everything is good, please comment and let us know. Thanks!

Apologies for the late response. I have indeed solved my issue; however, I am dealing with a new issue. I will post a new question though as it doesn’t quite relate to this one. Thank you.

I have same problem, but how I can rotate or translate a bone with a body instance. If I don’t have body instance I don’t have collisions.


Hi @giro,

It sounds like your question is a little bit different from this one. Would you mind posting a new question in order to prevent any possible confusion here?

No more different, same problem with body instance and same solution.

Yeah I’d like to know the answer as well. I remember tanks in udk can easily have body on turret and works well.