Box Collider Component: Difference between revisions
Jump to navigation
Jump to search
mNo edit summary |
(Added image) |
||
Line 2: | Line 2: | ||
== Component Settings == | == Component Settings == | ||
[[File:BoxColliderComponent.png|thumb|right|800px|The Box Collider component in the [[Inspector Window]] and [[Scene View]].]] | |||
{| class="wikitable" | {| class="wikitable" | ||
|- | |- | ||
Line 11: | Line 12: | ||
|- | |- | ||
|} | |} | ||
<br clear="all"> | |||
== Example Usage == | == Example Usage == | ||
=== Level Boundaries === | === Level Boundaries === |
Revision as of 00:11, 8 December 2022
The box collider component is a Physics Component that creates an invisible, solid, box-shaped volume.
Component Settings
Property | Description |
---|---|
Center | The center of the box volume. |
Size | The width, height and depth of the box volume in local space. |
Example Usage
Level Boundaries
Box colliders are the perfect way to keep players within the bounds of the level. It is recommended to use a visible object instead of an invisible wall, but if you want to make sure players don't escape over the top of a visible wall, you can place a box collider that extends much higher than the visible wall's collider.
Invisible objects
You may want to create an invisible platform as a challenge in a minigame.
Smoothing out collision on a complex object
You may have an object in the scene with complex collision, or holes in the object that players should not enter. Use a box collider to cover these areas to improve and simplify collision.