added collision table. Also emoji go brrr |
add missing collider component |
||
(7 intermediate revisions by 3 users not shown) | |||
Line 3: | Line 3: | ||
<!--T:2--> | <!--T:2--> | ||
* [[BoxCollider | * [[Component:BoxCollider|BoxCollider]]: Has an x, y, and z size. | ||
* [[CapsuleCollider | * [[Component:CapsuleCollider|CapsuleCollider]]: Has a height and a radius for the semispherical endcaps. | ||
* [[ConeCollider | * [[Component:ConeCollider|ConeCollider]]: Has a height and a radius for the circular end of the cone. | ||
* [[ConvexHullCollider | * [[Component:ConvexHullCollider|ConvexHullCollider]]: Is a [https://en.wikipedia.org/wiki/Convex_hull convex hull] (a shape closely wrapping the object, but with no indentations) over the mesh of the object. | ||
* [[CylinderCollider | * [[Component:CylinderCollider|CylinderCollider]]: Has a height and a radius for the circular endcaps. | ||
* [[MeshCollider | * [[Component:MeshCollider|MeshCollider]]: Is the outside of the mesh of the object. | ||
* [[SphereCollider | * [[Component:SphereCollider|SphereCollider]]: Has a radius for the sphere. | ||
* [[Component:TriangleCollider|TriangleCollider]]: Is a physical representation of a triangle poly. | |||
<!--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 | Two colliders are said to be in collision when they intersect each other. Collision events can be detected through the [[ProtoFlux:On Contact Start|On Contact Start]], [[ProtoFlux:On Contact Stay|On Contact Stay]], [[ProtoFlux:On Contact End|On Contact End]] ProtoFlux nodes, which take a Collider component. They then check the given Collider, and output an [[Impulses|impulse]] along with the other Collider that triggered the collision. | ||
<!--T:4--> | <!--T:4--> | ||
Line 19: | Line 20: | ||
<!--T:5--> | <!--T:5--> | ||
{{Table ComponentFields | {{Table ComponentFields | ||
|Offset|Float3| | |Offset|Float3| {{Template:ColliderOffsetField}} | ||
|Type|ColliderType| | |Type|ColliderType| {{Template:ColliderTypeField}} | ||
|CharacterCollider|Bool| | |CharacterCollider|Bool| {{Template:ColliderCharacterColliderField}} | ||
|IgnoreRaycasts|Bool| | |IgnoreRaycasts|Bool| {{Template:ColliderIgnoreRaycastsField}} | ||
}} | }} | ||
Line 29: | Line 30: | ||
<!--T:7--> | <!--T:7--> | ||
{{Template:ColliderTypesTable}} | |||
<!--T:8--> | <!--T:8--> | ||
Line 47: | Line 38: | ||
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. | 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. | ||
== Types of Collisions Table == | |||
<!--T:11--> | <!--T:11--> | ||
{| class="wikitable" | {| class="wikitable" | ||
Line 92: | Line 84: | ||
|X | |X | ||
|- | |- | ||
|Mesh (active | |Mesh (active) | ||
|✓ | |✓ | ||
|✓ | |✓ | ||
Line 107: | Line 99: | ||
<!--T:10--> | <!--T:10--> | ||
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. | 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. | ||
== See Also == | |||
* [https://en.wikipedia.org/wiki/Minimum_bounding_box Bounding Box defined on Wikipedia] | |||
* [https://en.wikipedia.org/wiki/Convex_hull Convex Hull defined on Wikipedia] | |||
* [[Type:BoundingBox|Bounding Box Type]] |
Latest revision as of 21:50, 17 October 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.
- TriangleCollider: Is a physical representation of a triangle poly.
Two colliders are said to be in collision when they intersect each other. Collision events can be detected through the On Contact Start, On Contact Stay, On Contact 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. See the enum page for details. |
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. Also this applies to raycasting nodes or components. |
Colliders also have a type which determines whether it interacts with other colliders:
Name | Value | Description |
---|---|---|
NoCollision
|
0 | As the name implies, no interaction happens. |
Static
|
1 | Interacts with other active colliders. |
Trigger
|
2 | 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. |
StaticTrigger
|
3 | Behaves the same as Trigger except it is more performant for non-moving objects. |
StaticTriggerAuto
|
4 | Behaves the same as StaticTrigger, but will automatically switch to Trigger if the object moves. |
Active
|
5 | 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. |
CharacterController
|
6 | This allows a CharacterController to use the specified collider as its collision for physics based interactions (only the first of this type in a slot with a CharacterController on it will be chosen). |
HapticTrigger
|
7 | This is used to detect and trigger haptics events on the player. |
HapticStaticTrigger
|
8 | This is the same as HapticTrigger except it is more performant for non-moving objects. |
HapticStaticTriggerAuto
|
9 | This is the same as HapticStaticTrigger, but will automatically switch to HapticTrigger if the object moves. |
HapticSampler
|
10 | This is used in conjunction with the HapticPointSampler component in order to sample haptics events from a HapticVolume for debug purposes. |
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.
Types of Collisions Table
V 0.2 | Static | Trigger | Active | No Collision |
---|---|---|---|---|
Static | X | X | ✓ | X |
Trigger | X | X | ✓ | X |
Active | ✓ | ✓ | X | X |
User Body Part | X | X | ✓ | X |
User Locomotion | X | ✓ | ✓ | X |
Mesh | X | X | X | X |
Mesh (active) | ✓ | ✓ | X | X |
User in Anchor | X | X | ✓ | X |
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.