Table of Contents

Jolt Shapes

A Jolt actor configures how an object behaves in the physics simulation. However, every physical presence also requires to have a 3D shape. The shape of actors is set up using Jolt shape components.

Dynamic actors can only be simulated with convex shapes. Therefore concave collision meshes are exclusive to static actors. All shape components represent convex geometry and work with all physics actor types.

Shape Components

The following shape components are available:

Actor Shape Setup

The easiest kind of actor shape setup is to simply attach a shape component to the same game object that the actor component is attached to. This way the position of the game object is also the center of the shape, which is often sufficient.

For more complex shapes, you can add child nodes below the actor node, attach the shapes to those nodes, and position the nodes as needed.

When an actor is initialized for the simulation, it traverses the hierarchy below its owner game object and gathers all shape components. When it encounters another actor component, all shapes below that node are ignored.

All shapes that are found this way are added to the actor as one compound shape. This way you can build a single actor that has a complex shape, made up of many parts.

You can't add or remove individual shapes during simulation. If you need pieces to be destructible, you need to turn them into separate actors. To still have those actors move in unison, you need to join them using a fixed joint.

Friction and Restitution

Friction and restitution are the two physical properties that affect a shape's physical behavior the most. See this section for details.

See Also