Rigid objects means there are Physics backend computing the physics-based behaviour such as movement, gravity, and collision.

Set up an object as RigidBody

Collider

Collider is the shape which is used for collision computation.

Check Unity manual for a background knowledge.

https://docs.unity3d.com/2023.1/Documentation/Manual/collision-section.html

Unity Collider

Unity provides some colliders with primitive shapes, for instance, box, capsule, sphere, etc. It is possible to attach these colliders on objects with different shapes.

Cube: Create a cube. Click on it and you can see a box collider. Its shape can be adjustable.

<aside> đź’ˇ The collision shape is not necessarily the same as the visual shape. Sometimes setting colliders smartly will help you setup the environment for some tasks.

</aside>

Untitled

Untitled

Attach RigidBody property to it. You can go to “add component” and search “RigidBody”.

You can adjust its mass and other properties.

Untitled

Attach RigidBodyAttr , and assign it an ID.

Untitled

VHACD Collider

For objects with more complex shape, we can use VHACD to decompose its mesh and generate a series of colliders.

Drag some object into the scene. Here in the example, we search “hammer” and select hammer.fbx.