Browse Source

Bugfix: Fall back to contact velocity when body could not be locked

Jorrit Rouwe 2 years ago
parent
commit
1d9641bc94
1 changed files with 3 additions and 0 deletions
  1. 3 0
      Jolt/Physics/Character/CharacterVirtual.cpp

+ 3 - 0
Jolt/Physics/Character/CharacterVirtual.cpp

@@ -790,6 +790,9 @@ void CharacterVirtual::UpdateSupportingContact(bool inSkipContactVelocityCheck,
 						}
 						}
 						else
 						else
 						{
 						{
+							// Fall back to contact velocity
+							avg_velocity += c.mLinearVelocity;
+
 							angular_velocity = Vec3::sZero();
 							angular_velocity = Vec3::sZero();
 							com = RVec3::sZero();
 							com = RVec3::sZero();
 						}
 						}