Question Accessing and modifiying protected variables - Comply Speed, Threshold

Seb_3D

New member
Messages
15
Reactions
7
Points
3
Hello,

I've been trying to set the Comply Position/Rotation Threshold and Comply Speed via a script in a similar fashion the how the other FreeControllerV3 variables are set but I was unable to set those three as they are protected in the base class
1672674970216.png


1672675064363.png

1672675081295.png


The regular "FreeControllerV3.RBComplyPositionDamper = 5.0f;" declaration won't work on FreeControllerV3.complySpeed.

Any ideas??

Thank you
 
You can do this using JSONStorables. For example, to set the compliance speed of the left arm free controller is something like this:
C#:
string nodeName = "lArmControl";
JSONStorable nodeStorable = targetAtom.GetStorableByID(nodeName);
JSONStorableFloat nodeComplianceSpeed = nodeStorable.GetFloatJSONParam("complySpeed");
nodeComplianceSpeed.val = 5f;

You can check the storable names and parameters using any trigger action in VAM:
1673190642705.png
 
Last edited:
Upvote 0
Back
Top Bottom