Skip to content

Commit

Permalink
Remove redundant ArgumentException for zero mass shapes (#112)
Browse files Browse the repository at this point in the history
  • Loading branch information
notgiven688 authored Mar 25, 2024
1 parent a5831ea commit e57df59
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions src/Jitter2/Dynamics/RigidBody.cs
Original file line number Diff line number Diff line change
Expand Up @@ -337,13 +337,6 @@ private void AttachToShape(Shape shape)
throw new ArgumentException("Shape has already been added to another body.", nameof(shape));
}

if (shape.Mass == 0)
{
throw new ArgumentException("Tried to add a shape with zero mass to a rigid body. " +
$"If you are using custom shapes make sure to call {nameof(Shape.UpdateShape)}.",
nameof(shape));
}

shape.UpdateWorldBoundingBox();
World.AddShape(shape, this.IsActive);
}
Expand Down

0 comments on commit e57df59

Please sign in to comment.