Optional
options: Partial<BoxColliderOptions>Height of the rectangle
Ignores collisions with layers in the array
Collision layer
X-Y axis offset
TRUE if this collider interact with rigid bodies
Rectangle rotation in radians
Width of the rectangle
The BoxCollider component defines a rectangular collision shape for an entity.
It can be used for both physics interactions and collision detection.
The collider's size is determined by its width and height, and it can be offset and rotated.
Collision layers allow controlling which objects can collide with each other.
Example