Merge branch 'Tryibion-dont-clamp-vel'

This commit is contained in:
Wojtek Figat
2023-12-06 12:37:35 +01:00

View File

@@ -2803,7 +2803,7 @@ void PhysicsBackend::SetHingeJointLimit(void* joint, const LimitAngularRange& va
void PhysicsBackend::SetHingeJointDrive(void* joint, const HingeJointDrive& value)
{
auto jointPhysX = (PxRevoluteJoint*)joint;
jointPhysX->setDriveVelocity(Math::Max(value.Velocity, 0.0f));
jointPhysX->setDriveVelocity(value.Velocity);
jointPhysX->setDriveForceLimit(Math::Max(value.ForceLimit, 0.0f));
jointPhysX->setDriveGearRatio(Math::Max(value.GearRatio, 0.0f));
jointPhysX->setRevoluteJointFlag(PxRevoluteJointFlag::eDRIVE_FREESPIN, value.FreeSpin);