How to control morph curve from C++?

I have a morph on a simple object. It’s just an opening on a tower (tower defense game) where a bomb will be ejected. It should just use the morph to open and close a “shutter” style object. To import it, I had to enable the skeletal mesh option. It has a bunch of stuff I don’t want or need.

  1. Is there a way to keep the curve, but delete the skeleton, physics asset, etc? Can I convert my skeletal mesh to a static mesh and retain the morph?
  2. How do I control the curve from C++?

I know how to create an animation sequence. But I already have all my other animations setup from C++ and control them from there. I’d like to just be able to set the morph value from 0 to 1. Is there a way to do this?

I found the answer. There’s a Blender plugin here:

https://github.com/JoshRBogart/unreal_tools?files=1

This will let you encode the world position offset into UV coordinates.
Then you can use a material with StaticMeshMorphTargets and plug it into World Position Offset pin. I had to reorder the coordinates as (X,Z,-Y).

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.