Browse Source

Also detect contacts when the normal is horizontal or pointing downwards. The GetGroundState will return Sliding in that case and it will be up to the application to determine what to do with it.

Jorrit Rouwe 3 years ago
parent
commit
452d6fe8c8
1 changed files with 1 additions and 1 deletions
  1. 1 1
      Jolt/Physics/Character/Character.cpp

+ 1 - 1
Jolt/Physics/Character/Character.cpp

@@ -126,7 +126,7 @@ void Character::PostSimulation(float inMaxSeparationDistance, bool inLockBodies)
 		Vec3				mGroundNormal = Vec3::sZero();
 		Vec3				mGroundNormal = Vec3::sZero();
 
 
 	private:
 	private:
-		float				mBestDot = 0.0f;
+		float				mBestDot = FLT_MAX;
 		Vec3				mGravity;
 		Vec3				mGravity;
 	};
 	};