n-box-collider

altspace/components. n-box-collider

Creates a box-shaped collider with the given dimensions. Collides with the cursor or avatars depending on the type property.

Example
<a-box n-box-collider='type: environment; size: 1, 0.5, 1'></a-box>

Extends

Members

center :vec3

The offset of the collider in local space.

Inherited From:
Default Value:
  • [0, 0, 0]

isTrigger :boolean

If true, this collider will not block other objects, but instead fire a triggerenter event when an object comes into contact with it, and a triggerexit when it leaves contact.

Inherited From:
Default Value:
  • false

size :vec3

The dimensions of the collider.

Default Value:
  • [1, 1, 1]

type :string

The type of collider, one of: object | environment | hologram. Object colliders collide with other objects, the environment, and the cursor. Environment colliders collide with everything objects do, but you can also teleport onto them. Hologram colliders only collide with other holograms and the cursor.

Inherited From:
Default Value:
  • "hologram"