How to animate control surfaces on a physics driven aircraft?

Hello,

Currently I’m trying to set up a skeletal mesh of an aircraft so that I can move the control surfaces (ailerons etc.) when it needs to roll/pitch/yaw. I’ve got the rig set up in Blender and I can rotate the bones there and it works great. I’ve imported it into UE4, set up an Aileron Roll variable in the planes blueprint so that I can send it to the Animation Graph:

When I set up an AnimBP for the skeleton, I cast the Pawn Owner to my BP and then get the aileron angle from that. I have another Rotator called Aileron Angle set up in the AnimBP, and just copy the value to that:

In the Anim Graph, as shown below, I then use the Transform Bone node to rotate the plane_aileron_right bone with this Aileron Angle rotator:

When I am not simulating physics at all this works great except I will be using physics to fly the plane. My roll input works and the aileron moves up and down like it should. When I set SimulatePhysics to True it no longer moves, but gravity applies and everything.

I have tried to set the constraints in the physics asset to Kinematic for just the aileron, but then the plane rotates around the aileron because it’s not supposed to move. When I do this, the ailerons move, but I can’t really move the whole plane.

I should mention that I’ve made sure that the rotator is getting from the plane BP to the anim BP, so that’s fine.

Basically it sounds like I need to somehow make the aileron not use physics so that I can drive it with animation without having it mess with the rest of the plane, or I need to blend it (?) which I don’t really know how to go about that. There are no premade animations from Blender on the mesh, just what I’m creating in UE4. If I have to use Blender then I’ll learn that I guess, but I’d like to find a way to make it work without that.

Thanks

So the problem I was having is that there was a physics constraint on the aileron bone. I removed that constraint in the physics asset and now the animation works and I can drive the skeletal mesh movement with physics. If anyone needs a more thorough explanation just comment :smiley:

Quite old, but struggling around with this. Could you post some of your blueprint for physics based aircraft?
I thought abound different bones on the plane and applying several forces on it but don’t succeed