48physx::PxJoint *QPrismaticJoint::createPhysxJoint(physx::PxRigidActor *actorA,
49 physx::PxRigidActor *actorB,
50 const physx::PxTransform &trfA,
51 const physx::PxTransform &trfB)
53 return physx::PxPrismaticJointCreate(*StaticPhysXObjects::getReference().physics, actorA, trfA,
57void QPrismaticJoint::setJointProperties()
59 physx::PxPrismaticJoint *joint =
static_cast<physx::PxPrismaticJoint *>(m_joint);
60 const physx::PxTolerancesScale scale =
61 StaticPhysXObjects::getReference().physics->getTolerancesScale();
62 const float lowerLimit = qMin(m_lowerLimit, m_upperLimit);
63 const float upperLimit = qMax(m_lowerLimit, m_upperLimit);
64 joint->setLimit(physx::PxJointLinearLimitPair(scale, lowerLimit, upperLimit));
65 joint->setPrismaticJointFlag(physx::PxPrismaticJointFlag::eLIMIT_ENABLED,
true);