fix: Physics Engine Stepping Inactive Rigid Bodies Fixed
This commit is contained in:
parent
f61f71dfe0
commit
4facfdb6cf
|
@ -100,7 +100,7 @@ public class PhysicsEngine2D : IPhysicsEngine2D
|
||||||
|
|
||||||
private static void StepRigidBody(IRigidBody2D rigidBody, float intervalDeltaTime)
|
private static void StepRigidBody(IRigidBody2D rigidBody, float intervalDeltaTime)
|
||||||
{
|
{
|
||||||
if (rigidBody.IsStatic)
|
if (rigidBody.IsStatic || !rigidBody.IsActive)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
rigidBody.Transform.Position += rigidBody.Velocity * intervalDeltaTime;
|
rigidBody.Transform.Position += rigidBody.Velocity * intervalDeltaTime;
|
||||||
|
|
Loading…
Reference in New Issue