Capsule primitive
Add a capsule shape to your scene and edit its properties.
Read time 1 minuteLast updated 2 days ago
A Capsule primitive is a rounded 3D shape GameObject with a circular cross‑section and hemispherical ends, which you can add quickly without importing a custom mesh. Capsule shapes can be useful to create character controllers, pills, posts, rockets, and prototype placeholders.
Capsule properties
Select your Capsule in the Hierarchy to open the Inspector window, which contains the object's properties. The following properties are available by default on Capsule primitives. You can add other components to your object to add more functionality.Change the values of this component to update the object's position, rotation, or size.
Property | Description |
|---|---|
| Position | Set or retrieve the object's location in 3D world space (X, Y, Z). |
| Rotation | Set or retrieve the object's rotation around the X, Y, and Z axes (degrees). |
| Scale | Use the X, Y, and Z values to change or retrieve the object's size. |
You need a Mesh Renderer component to display meshes in your scene. Without this component, a mesh can't be visible.
Property | Description |
|---|---|
| Mesh | Assign the mesh you want to show in your scene. |
| Materials | A list of materials that belong to this mesh. Expand the material to edit its properties. |
| Edit Material | Expand one of the materials to show this option. When you select this option, Unity Studio makes a copy of the material and assigns the copied material to the mesh. Because the material is a copy, you can change its properties without affecting other meshes that use the same original material. To change the material on all objects, refer to Edit the material in the My Assets folder. |
Material properties
Select Edit Material to change the properties of the material.For information about the material settings, refer to Material reference.A Capsule Collider is a physics collider shaped like a capsule. Use this collider on cylindrical objects that need to detect or respond to collisions. You can adjust its size and center to fit your mesh.
Property | Description |
|---|---|
| Use as Trigger | Enable to let other objects pass through this object without collision, but still fire events when the objects overlap. Disable to make the object unable to pass through. |
| Center | Define the center of the object where the collider starts from. |
| Direction | Change which direction the collider scales in. |
| Radius | Set the collider's size around its center. |
| Height | The height of the collider. |
Adjust how objects move and interact with gravity. You can set the mass of the object and choose whether it’s affected by gravity.
Property | Description |
|---|---|
| Mass | Define the mass of the object. |
| Use Gravity | Enable for gravity to impact the object. Object falls during Play mode unless it's grounded. Disable for gravity to have no impact. |