mNo edit summary |
m Capitalization and maybe grammar |
||
Line 12: | Line 12: | ||
<!--T:3--> | <!--T:3--> | ||
Two colliders are said to be in collision when they intersect each other. Collision events can be detected through the [[On Collision Start (ProtoFlux | Two colliders are said to be in collision when they intersect each other. Collision events can be detected through the [[On Collision Start (ProtoFlux Node)|On Collision Start]], [[On Collision Stay (ProtoFlux Node)|On Collision Stay]], [[On Collision End (ProtoFlux Node)|On Collision End]] ProtoFlux nodes, which take a Collider component. They then check the given Collider, and output an impulse along with the other Collider that triggered the collision. | ||
<!--T:4--> | <!--T:4--> |
Revision as of 00:19, 14 January 2024
A Collider is a component that controls how a Slot interacts with other colliders. Colliders have shapes that determine the boundary of interaction, and the component is always of a particular shape:
- BoxCollider: Has an x, y, and z size.
- CapsuleCollider: Has a height and a radius for the semispherical endcaps.
- ConeCollider: Has a height and a radius for the circular end of the cone.
- ConvexHullCollider: Is a convex hull (a shape closely wrapping the object, but with no indentations) over the mesh of the object.
- CylinderCollider: Has a height and a radius for the circular endcaps.
- MeshCollider: Is the outside of the mesh of the object.
- SphereCollider: Has a radius for the sphere.
Two colliders are said to be in collision when they intersect each other. Collision events can be detected through the On Collision Start, On Collision Stay, On Collision End ProtoFlux nodes, which take a Collider component. They then check the given Collider, and output an impulse along with the other Collider that triggered the collision.
Aside from the properties determining the shape of the collider, all colliders have the following properties:
Name | Type | Description |
---|---|---|
persistent
|
Bool | Determines whether or not this item will be saved to the server. |
UpdateOrder
|
Int | Controls the order in which this component is updated. |
Enabled
|
Bool | Controls whether or not this component is enabled. |
Offset
|
Float3 | The offset of the collider shape's position from the slot's position. |
Type
|
ColliderType | The type of collider. |
CharacterCollider
|
Bool | Whether an avatar should be prevented from moving into the collider's volume. |
IgnoreRaycasts
|
Bool | Whether an avatar's laser should be prevented from hitting the collider's volume. |
Colliders also have a type which determines whether it interacts with other colliders:
- Static: Interacts with other active colliders.
- Trigger: Interacts with other active colliders and user locomotion. Trigger colliders also prevent the avatar's laser from hitting the collider's volume, regardless of the IgnoreRaycasts setting.
- Active: Interacts with other static and trigger colliders, user body parts, user locomotion, and users in anchors. Such colliders are called "active" because they actively check every single frame for collisions with other things.
- NoCollision: As the name implies, no interaction happens.
- HapticTrigger: Unknown at present.
- HapticSampler: Unknown at present.
Note that active colliders do not cause collision events with other active collider types (possibly due to the computational costs involved).
MeshColliders are special cases. They only cause collision events with other primitive colliders (i.e. not other MeshColliders, again, possibly due to the computational costs involved), and the collision event fires only on the other collider.
Note that if a user is in No Clip locomotion mode, it means the user will not cause collision events with anything. This can be useful for "ghosting" through a world without causing interactions with anything.