Fix hand going Non-Kinematic when only hand.physics is false and humaonid.physics is true

This commit is contained in:
Pascal Serrarens 2025-09-30 12:46:22 +02:00
parent 156571e376
commit e75e412d10

View File

@ -455,7 +455,7 @@ namespace Passer.Humanoid {
AddTrackedRigidbody(trackedRigidbody); AddTrackedRigidbody(trackedRigidbody);
} }
if (humanoid.physics && grabbedRigidbody) if (this.physics && grabbedRigidbody)
AdvancedHandPhysics.SetNonKinematic(handRigidbody, colliders); AdvancedHandPhysics.SetNonKinematic(handRigidbody, colliders);
// This does not work in the editor, so controller input cannot be set this way // This does not work in the editor, so controller input cannot be set this way
@ -796,7 +796,7 @@ namespace Passer.Humanoid {
Object.DontDestroyOnLoad(grabbedObject); Object.DontDestroyOnLoad(grabbedObject);
} }
if (humanoid.physics) if (this.physics)
AdvancedHandPhysics.SetNonKinematic(handRigidbody, colliders); AdvancedHandPhysics.SetNonKinematic(handRigidbody, colliders);
if (grabbedRigidbody) if (grabbedRigidbody)