Skip to content

Commit

Permalink
Remove isHollow property from colliders.
Browse files Browse the repository at this point in the history
Might make a return in the future, but this likely complicates the spec
unnecessarily, given that most engines don't have support for hollow
shapes and my experience of such a feature is that it's comparatively
niche.

Closes #6.
  • Loading branch information
eoineoineoin committed Jan 10, 2023
1 parent fa68de8 commit 8d3a520
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,7 @@ To describe the shape that the physics engine should use, colliders must define
|**convex**|`object`|A convex hull wrapping a `mesh` object.|
|**trimesh**|`object`|A triangulated physics representation of a `mesh` object.|

The sphere, box, capsule, cylinder and convex types should all produce _solid_ colliders by default - a rigid body anywhere inside the shape should be pushed out of it.
However you can request the shapes to be created as a _shell_ instead by enabling the **isHollow** parameter - in this case a rigid body inside the shape should collide with the inside of the shell.
The sphere, box, capsule, cylinder and convex types should all produce _solid_ colliders - a rigid body anywhere inside the shape should be pushed out of it.
However the trimesh type always represents an infinitely thin shell or sheet - for example a mesh collider created from a `mesh` object in the shape of a box will be represented as a hollow box in the physics engine.

If you want your collider to have an offset from the local space (for example a sphere _not_ centered at local origin, or a rotated box), you should add an extra node to the hierarchy and apply your transform and your collider properties to that.
Expand Down

0 comments on commit 8d3a520

Please sign in to comment.