PoseableMeshComponent instead of SkeletalMeshComponent

Hi,

I’d like to use UPoseableMeshComponent to allow me to have some custom C++ code drive a skeleton within a Blueprint. However I can’t see how to create a UPoseableMeshComponent from a skeleton/mesh in Blueprint. I have an FBX with a skeleton and skinned mesh imported into my game. I can drag this into my Blueprint, but it comes in to the Blueprint as a SkeletalMeshComponent. I thought maybe I need to change the way I import that skeleton/mesh into the game to stop it creating a SkeletalMeshComponent, but the seems to have no options for which class to construct on import and I can’t see a way to convert it to UPoseableMeshComponent after import.

Or am I going about this totally wrong?!

Thanks,
Alasdair

Hi Alasdair,

You can use the Add button to add an arbitrary component like a UPoseableMeshComponent, and then set the SkeletalMesh property of your newly added component to point to your imported asset. The only thing dragging-and-dropping the asset in does is automatically set stuff like that up for you.

If you do want to add a custom component for some asset type or force it to do something differently, check out the component asset broker system (FComponentAssetBrokerageage).

Cheers,
Michael Noland

Hi Michael,

thanks for explaining that, exactly what I needed! I’ll also check out FComponentAssetBrokerageage, sounds like something I’ll need pretty soon.

Cheers,
Alasdair

Is there a way to add Physics to a Poseable Mesh (like a Physics Asset you can use with a Skeletal Mesh). I’m trying to do a similar thing where I want to manipulate bones from C++, but I can’t find a way to do it with Skeletal Meshes. I’m trying to make something very simple: a turret cannon that you can rotate and adjust the angle of the cannon while you’re next to it.

Thank you,

We don’t support poseable mesh with physics. Poseable mesh is one you can control everything. Once we support physics on them, we also have to support how it blends or so.

If you have to use physics, use normal skeletalmeshcomponent and use anim BP to control bone trasnform. Modify Bone(Transform Bone) node should allow to you set any transform you want, and you can control how much physics blending vs kinematic.

Hope that helps.

–Lina,

I have a skeletalmeshcomponent but once you have collision bodies and constraints associated with the bone you can no longer rotate them. In my instance I have a simple vehicle that i just want to roll and turn. I have modeled and rigged it and all is fine until I attempt to rotate the “steering bone”. If i remove the collision body for that bone i can rotate it, but the mesh “falls apart” when other parts collide with the ground. What is the right way to do this? basically I want a skeletal mesh to behave physically but I want to be able to rotate a bone to steer the mesh.

Why has no one from unreal answered how to do this. Is seems it should be simply to do with such a power game and physics engine but after weeks of messing with skeletalmesh is it unclear how to achieve it.

If you have physical and “kinematic” or code-driven systems interacting, they often fight with each other. The best solution if you have a “wheel” bone is to apply additional physical forces to that. For example, create a socket on your wheel bone (or get the name of the bone/joint itself), and then use the “apply torque”, “set angular velocity” or “add delta rotation” Blueprint nodes that allow you to specify the bone of the skeletal mesh to apply the force to.

You may have to mess around with casting your skeletal mesh components, the size of the forces applied, and the various optional settings on those nodes (e.g. teleport physics, add to current, etc.) to get that system work. But applying more physics forces – as you would with an actual wheel – is likely the preferred solution here.