PxD6Joint Problem

Hello. My problem is that I can not properly restrict rotation PxD6Jointt, I make the car and can not configure correctly restrictions for the front wheels and the rotation of the steering.

Hello, did you solve your problem ?

Are you sure you set the correct flags for limits ?

joint->setMotion(physx::PxD6Axis::eTWIST, physx::PxD6Motion::eLIMITED );

I had a problem with limits not holding correctly, there are 2 things that I made that helped:

  • projecting limits:
joint->setProjectionAngularTolerance(0.1f);
  • using spring limits:
physx::PxSpring spring(_jointLimitsStiffness, _jointLimitsDamping);
joint->setSwingLimit(physx::PxJointLimitCone(angularLimits.y, angularLimits.z, spring));
joint->setTwistLimit(physx::PxJointAngularLimitPair(-angularLimits.x, angularLimits.x, spring));