Is there a way to constrain object positions (but not rotation) to corresponding animated skeleton joints' positions?

Super new to UE but trying to do something sort of non-standard and not sure how to proceed. I’m working in Blueprints, not C++, FWIW.

I’ve got an animated character skinned skeleton mesh from Mixamo and trying to hide its mesh and instead draw a collection of cubes whose world position animation are driven by the skeletal animation.

Basically I want to position a cube at select joint positions (excluding those too close like fingers) which updates as the character animation plays. However, I don’t want them to rotate the way skinning (or prop sockets) would do, instead remaining at 0,0,0 world rotation

I can do this in mere moments in Maya, just by point constraining (but not rotation constraining) each desired joint to control a corresponding cube. However, I’m trying to do it in UE instead, as ultimately I want to use player controls or kinect input (not mixamo animation) to drive the animation, but i figure first things first.

I discovered there’s a way to make a character rig and, in its blueprint editor, create a Collections from select bones. However, I’m not clear what to do next.

Seems I just need to do something like create a collection of cubes, each of which knows what bone to attach to, and then loop through them all, repositioning each (in world coords) to their corresponding bone world location. Or maybe instead destroying every object in a cube collection and creating a new cube blueprint instance at each joint in the joint collection?

  • should i be working inside a new character rig’s blueprint? Somewhere else?
  • how do I create a collection of objects?
  • what event should I connect to (would need to make it refresh each frame?)
  • would it be better to simply attach a box to a socket at each joint and instead counter-rotating each frame to undo any joint object rotation?
  • is it possible to position an additional cube midway between two joints’ positions?

Any advice, tutorial links or other nudges in the right direction are much appreciated!
thanks!

update - a much simpler socket version (which forces rotation) seems ok for now, but still open to learning more about how to do the equivalent of Maya point constraints in Unreal.

Not sure regarding the use of Control Rig, but using just the main Blueprint you can do the following:
In your BP get a reference of your skeletal mesh, then use GetSocketTransform node and specify the name of the joint: this will give you the transforms of whatever joint you choose.

Create a Cube, place the reference inside the Event Graph, drag a pin and use SetWorldLocation, then get the translation output from the GetSocketTransform and use it on the SetworldLocation translation.

This will set the cube location where the joint is, keeping its default rotation.
Not sure if you can loop the same thing for each joint, if not you’ll spend some time creating the setup, but it’ll work.

1 Like