Geometries
Each of the physics bodies covered in the previous section require you to attach some kind of geometry to them which will define their geometry in the physics engine.
Remember that the physics engine only “sees” these geometries, and will detect collision of your physics bodies by checking for overlap between these geometries.
The geometry of your physics body can be a box, a plane, a sphere, a capsule, a cylinder, or a collision geometry.
To add one to your entity, add its corresponding geometry component (i.e.
, , etc). To visualize the geometries and make sure their attributes are well set up, enable debug lines.Box
Compatible with: static body, rigid body, kinematic rigid body, character controller

Box Geometry
box_geometry
Box geometry.
Box Geometry
box_geometry
dimension
Vector3
Default: [1,1,1]
offset
Vector3
Default: [0,0,0]
Plane
Compatible with: static body, kinematic rigid body
Planes divide space into "above" and "below" them. Everything "below" the plane will collide with it.

Plane Geometry
plane_geometry
Plane geometry.
Plane Geometry
plane_geometry
distance
Float
Default: 0
normal
Vector3
Default: [0,1,0]
Sphere
Compatible with: static body, rigid body, kinematic rigid body

Sphere Geometry
sphere_geometry
Sphere geometry.
Sphere Geometry
sphere_geometry
offset
Vector3
Default: [0,0,0]
radius
Float
Default: 0.5
Cylinder
Compatible with: static body, rigid body, kinematic rigid body

Cylinder Geometry
cylinder_geometry
Cylinder geometry.
Cylinder Geometry
cylinder_geometry
axis
Integer
Default: [1] Y-Axis
[0] X-Axis [1] Y-Axis [2] Z-Axis
height
Float
Default: 1
offset
Vector3
Default: [0,0,0]
radius
Float
Default: 0.5
Capsule
Compatible with: static body, rigid body, kinematic rigid body, character controller

Capsule Geometry
capsule_geometry
Capsule geometry.
Capsule Geometry
capsule_geometry
axis
Integer
Default: [1] Y-Axis
[0] X-Axis [1] Y-Axis [2] Z-Axis
height
Float
Default: 1
offset
Vector3
Default: [0,0,0]
radius
Float
Default: 0.5
Collision Geometry
Compatible with: Read below
Collision Geometry Reference
collision_geometry_ref
Reference to a collision geometry.
Collision Geometry Reference
collision_geometry_ref
collisionGeometryRef
Asset UUID
If you want to use a triangular mesh or a convex mesh as a geometry for your physics body, you need to create a collision geometry. A
is an asset that you can create from a mesh you provide it.There are two types of collision geometry:
Convex
- This is a convex mesh, that will encapsulate all the points of your mesh. A mesh is convex if, given any two points within it, the mesh contains the line between them.
- Compatible with: static body, rigid body, kinematic rigid body
Triangular
- This is a triangular mesh, that will encapsulate all the points of your mesh. It will wrap as closely to the original mesh you provide as possible.
- Compatible with: static body, kinematic rigid body


Between the two, the convex collision geometry is the recommended default choice. A convex collision geometry is less computationally heavy as it contains less vertices than the triangular collision geometry. Also, triangular collision geometries cannot be assigned to rigid bodies.
To create a collision geometry, right click on an entity with a mesh reference component in your scene graph and select Create convex collision geometry
or Create triangular collision geometry
.

Once the collision geometry is created, your entity will be automatically assigned a collision geometry reference component and the collision geometry will be attached to it.