Cast issue: Hand orientation driving Scalar Parameter

Hi all,

I’m creating a setup where the hand orientation values are driving the scalar parameter.

I’m using the standard ThirdPersonBP to get the orientation values ( move up, move down ), clamped to a value that goes from 0 to 1.

I created another BP with a simple sphere and a material with a scalara parameter in it, called RedValueValue, which is set to editable.

So the idea is to drive the scalar parameter value of the material using the clamped hand orientation values.

In the ThirdPersonBP, after EventBeginPlay, I cast to the sphereBP and set the RedValueValue scalar parameter ( see image attached ); the yellow line you see is the 0 to 1 value from the hand orientation.

Even if I don’t get any errors, the entire thing doesn’t work, and I’m not sure why.
If I manually set the RedValueValue to 1 and test it into the map the scalar parameter is not triggered.

I created a very similar setup, with the difference that I’m driving a float value using the same hand orientation, but I’m using “GetAnimInstance” as the “Object” because I’m driving a value inside the AnimBP, so I’m not sure if the “Get Owner” as an object is wrong or I’m doing something else which doesn’t work.

I also tried the “Get all actors of class” > Get > Cast, but I get a “Item is already a XXXXXBP” error.

Any help is appreciated :slight_smile: