Example
<a-entity gltf-model='#building' n-mesh-collider='type: environment'></a-entity>
Extends
Members
center :vec3
The offset of the collider in local space.
- Inherited From:
- Default Value:
- [0, 0, 0]
convex :boolean
Whether the collider should be convex or concave. Set this to false if you have holes in your mesh. Convex colliders are limited to 255 triangles. Note: concave colliders can be significantly more expensive to evaluate compared to convex colliders, so should be used sparingly.
- Default Value:
- true
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
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"