How to - Pass a variable from Anim BP to Control Rig's Construction Event

In UE5 it seems I can no longer pass values from an Animation Blueprint to Control Rig, if accessed in a Construction Event.

For UE4 I had created a generic “limb” setup that could be used for arms or legs. I used Control Rig variables which I exposed and set via an Animation Blueprint. For example, I would pass in the names of the bones for the upperarm, elbow and hand (or hip, knee and foot) on the exposed variables on the Control Rig node inside of the AnimGraph, instead of having them static typed within the Control Rig itself.

In UE5, this doesn’t appear to work anymore and only the default values of the variables are used.

To be clear, the values can be accessed via Forward Solve, but not the Construction Event. There is some math being done with these values within the Construction Event, so I would prefer to not have to tick these every frame… and only do them once.

It may be that the variables you’re passing to Control Rig are being set on Begin Play of the ABP, so it is perfectly normal that in Construction Script of Control Rig you’re not receiving the variables, because they’re not set yet.
If you create the variables inside the ABP and manually set them to what you need ( joints name ) you’ll be able to use them in Construction Script ( haven’t tested so not 100% sure about this ).

@Enter_Reality , thanks for the reply.

I’m not sure what you mean by creating the variables in ABP. This documented method is the recommended method: Control Rig in Animation Blueprints in Unreal Engine

Is there another method that I’m not aware of?

The data is passed in through variables created in/on the Control Rig, and exposed to be able to written to in order to get the data into Control Rig. I can access this data just fine in the Forward Solve, but not the Construction Event. Sorry to be a broken record, but this worked fine in UE4, but no longer works in UE5.

Perhaps some diagram images will be helpful.

You can see the first image shows the exposed Control Rig variables for Bone Base, Bone Mid, Bone End, and Limb Length Limit Ratio.

2024-04-09_5301_DiagnosticShoulder_-_Unreal_Editor

In this second image you can see how I’m accessing this data in the Control Rig’s Construction Event. It’s worth noting that if I unplug the strings, the default value of the Limb Length Limit Ratio is used, and not the value set in the ABP.

Once again, I appreciate the help. I hope I’m just missing something new & obvious.

The “creatign variables in ABP” is what you did, meaning that you have data that you’re plugging into the Control Rig by exposing them, so all good there.
I’ll try to reproduce the same setup to see what’s going on and yes, itmight be that previously you were able to make it work, but since UE4 Control Rig has been updated quiate a bit, so maybe this is something that was changed along the way.

1 Like

Yeah, I kinda expected there would be issues in the Construction Script area, as I noted some significant changes there when it comes to BPs and Control Rig mappings (for example).

Thanks again.

I ran into this issue again, in a slightly different use case.
Would be very helpful to have this working and/or at least know if I’m barking up the wrong tree or not.

I see Control Rigs as functions that I can (easily) pass in values to customize it’s behavior… but apparently this isn’t the case?

Spoke to a Epic employee about this who uses/teaches Control Rig.

Seems you cannot set this in an Animation Blueprint, but you can set it on the Component. I haven’t looked into this yet, but wanted to note this before I get sidetracked again.