Rigid objects means there are Physics backend computing the physics-based behaviour such as movement, gravity, and collision.
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 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>
Attach RigidBody
property to it. You can go to “add component” and search “RigidBody”.
You can adjust its mass and other properties.
Attach RigidBodyAttr
, and assign it an ID.
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.