How to change CharacterJoint Swing 1 Limit at runtime
I cant set limit value of Swing 1 Limit of component CharacterJoint through script below 3. For example I cant set limit equal to 1 through script.
Code example in your Update script:
int count = characterJoints.Count;
for (int i = 0; i < count; i++)
{
var joint = characterJoints[i];
var swing1 = new SoftJointLimit() { limit = 1f };
joint.swing1Limit = swing1;
}
At the inspector in component CharacterJoint you will see limit value equals 3
Btw you can easily change this value through editor to anything else. But i want to do it through script dynamicly
Your answer
Follow this Question
Related Questions
How to do rope swinging? 2 Answers
Trying to create character joint, but object zooms away instead. 0 Answers
How can I make HingeJoint2D more flexible? 0 Answers
2D attaching Joint With Script ? 1 Answer