n-capsule-collider

altspace/components. n-capsule-collider

Create a capsule-shaped collider on this entity. Capsules are a union of a cylinder and two hemispheres on top and bottom. Collides with the cursor or avatars depending on the type property.

Example
<a-cylinder n-capsule-collider='type: environment'></a-cylinder>

Extends

Members

center :vec3

The offset of the collider in local space.

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

direction :string

The axis with which the capsule is aligned. Must be one of 'x', 'y' or 'z'.

Default Value:
  • 'y'

height :number

The height of the shaft of the capsule in meters.

Default Value:
  • 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

radius :number

The radius of the capsule in meters.

Default Value:
  • 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"