Jelajahi Sumber

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 tahun lalu
induk
melakukan
452d6fe8c8
1 mengubah file dengan 1 tambahan dan 1 penghapusan
  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();
 
 	private:
-		float				mBestDot = 0.0f;
+		float				mBestDot = FLT_MAX;
 		Vec3				mGravity;
 	};