I’d like to create a vehicle suspension ( something that works like wheelCollider ), and it seems to be possible only with ConfigurableJoint.
For now, I have a main rigibody and 4 children wheels with each a configurableJoint ( with connectedBody set to main rigibody ).
I have tried many things with no success.
The movement is only to be done on the y-axis, so I set up :
joint.anchor = new Vector3(0, 0.25f, 0);
joint.axis = new Vector3(0,1,0);
joint.xMotion = ConfigurableJointMotion.Locked;
joint.yMotion = ConfigurableJointMotion.Limited;
joint.zMotion = ConfigurableJointMotion.Locked;
joint.angularXMotion =ConfigurableJointMotion.Locked;
joint.angularYMotion =ConfigurableJointMotion.Locked;
joint.angularZMotion =ConfigurableJointMotion.Locked;
And setting some params :
SoftJointLimit linearlimit = joint.linearLimit;
linearlimit.limit = 0.0f;
linearlimit.bouncyness = 0.1f;
linearlimit.damper = 5000;
linearlimit.spring = 10;
joint.linearLimit = linearlimit;
Does someone know how to configure it?