Geometry

interface Geometry

A raw, serializable form of a physical volume that can be constructed by a user. You can not use this object as the shape of a Collider, however you can convert it into a Shape using PhysicsEngine.createShape. This object stores no information on world-space position; all parameters are given in local-space.

Not every geometry has the same performance and stability. You should use the simplest shape that fits your use case, rather than trying to make the physics shape match the visible shape.

Margin

Convex geometries may have a "margin", "convex radius" or "border radius", which is an extra scalar value which adds a bit of extra volume to the outside of the shape, making the shape rounded. This is used to improve performance during collision detection, since this margin means less work has to be done during narrow-phase collision resolution (finding contact normals and penetration depth).

  • If you're unsure, you should leave this as the default for the specific geometry type you're working with.

  • If you want to disable this, set it to 0.0.

Inheritors