n-sphere-collider

altspace/components. n-sphere-collider

Creates a sphere-shaped collider of the given radius. Collides with the cursor or avatars depending on the type property.

Example
<a-sphere radius=1 n-sphere-collider='radius: 1; type: object;'></a-sphere>

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

radius :Number

The radius of the sphere collider 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"