Skip to main content
Version: 4.6.0

Capsule Collider

Colliders play a crucial role in creating interactive AR experiences by defining the physical boundaries and properties of objects within the scene. The Capsule Collider is a collider component that defines a cylindrical volume with hemispherical ends. It is well-suited for representing objects of cylindrical shapes.

collider demos

Add a Collider Component

In the Hierarchy panel, select a 3D object and locate its components in the Inspector panel.

Click + Add component, go to 3D Physics, and then select your Capsule Collider.

add collider component

Properties

The following parameters can be adjusted for a Capsule Collider.

add capsule collider component
PropertyDescription
RadiusThe radius of the capsule collider, relative to the origin of the game object. Modifying this parameter lets you control the width of the cylindrical portion of the collider.
HeightThe height of the capsule collider, relative to the origin of the game object. By adjusting this parameter, you can change the length of the cylindrical portion of the collider.
OffsetThis determines the position of the center of the capsule collider relative to the origin of the game object. Adjusting the offset allows you to position the collider as desired.
RotationThe rotation of the capsule collider in local space
Physics MatterDefines the physical properties of a rigid body, such as its friction and bounciness.
Is TangibleDetermines whether the collider is a trigger or a solid collider. If true, the collider will not physically affect other colliders, but will still generate trigger events when another collider enters or exits its bounds. If false, the collider will physically interact with other colliders, blocking their movement and generating collisions. Defaults to true.
Show ColliderEnabling this option allows the capsule collider to become visible in the scene view, making it easier to visualize and adjust its position and size during the editing process.

Use Colliders with a Rigid Body Component

In the physical world, objects require both colliders and rigid bodies to interact with one another realistically. Colliders define the shape and boundaries of objects, while rigid bodies provide the mass, velocity, and other physical properties necessary for realistic physics simulations.

By attaching a Collider component to a game object, you define its physical shape and characteristics. When a Rigid Body component is added to the same object, it enables the object to respond to physical forces like gravity, collisions, and interactions with other objects in the scene.

The combination of Collider and Rigid Body components allows for the creation of dynamic and interactive AR experiences in TikTok Effect House. By defining the appropriate Collider and configuring Rigid Body properties such as mass, drag, and constraints, you can achieve realistic object behavior and interactions within the AR environment.