m ProbablePrime moved page ColliderUserTracker (Component) to Component:ColliderUserTracker: Creating component Namespace |
Slight grammar change and a usage addition for its most common usage pattern |
||
(2 intermediate revisions by 2 users not shown) | |||
Line 6: | Line 6: | ||
}} | }} | ||
The '''ColliderUserTracker''' keeps track of users who enter and leave a collider | The '''ColliderUserTracker''' keeps track of users who enter and leave a collider. It must be used on a Slot that also has an attached Collider whose type is set to "Trigger". | ||
As this component works on colliders, it cannot detect users in No-Clip. | |||
<!--T:2--> | <!--T:2--> | ||
== Fields == | == Fields == | ||
{{Table ComponentFields | {{Table ComponentFields | ||
|IsLocalUserInside|Bool| Becomes set for the local user if the local user is within the collider of the object that this component is attached to. | |TriggersOnly|Bool| | ||
|IsAnyUserInside|Bool| Becomes set for all users if any user is within the collider of the object that this component is attached to. | |IsLocalUserInside|{{RootFieldType|RawOutput`1|[[Type:Bool|Bool]]}}|TypeAdv1=true| Becomes set for the local user if the local user is within the collider of the object that this component is attached to. | ||
|NumberOfUsersInside|Int| Tracks the number of users inside the collider of the object that this component is attached to. | |IsAnyUserInside|{{RootFieldType|RawOutput`1|[[Type:Bool|Bool]]}}|TypeAdv2=true| Becomes set for all users if any user is within the collider of the object that this component is attached to. | ||
|_usersInside|SyncBag`1| | |NumberOfUsersInside|{{RootFieldType|RawOutput`1|[[Type:Int|Int]]}}|TypeAdv3=true| Tracks the number of users inside the collider of the object that this component is attached to. | ||
|_usersInside|{{RootFieldType|SyncBag`1|[[Type:UserRef|UserRef]]}}|TypeAdv4=true| Data on the users that are inside the collider of the object that this component is attached to. | |||
}} | }} | ||
Line 21: | Line 24: | ||
{{stub}} | {{stub}} | ||
<!--T:4--> | <!--T:4-->This component can be very useful in defining zones in a world for various features, the most common of which is using the IsLocalUserInside bool to drive the Enabled state on various slots to work as a culling system. | ||
== Examples == | == Examples == | ||
{{stub}} | {{stub}} | ||
[[Category:ComponentStubs]] | [[Category:ComponentStubs]] | ||
[[Category:Components|Collider User Tracker]] | [[Category:Components:Physics:Utility{{#translation:}}|Collider User Tracker]] | ||
[[Category:Components: | [[Category:Components{{#translation:}}|Collider User Tracker]] |
Latest revision as of 02:16, 25 July 2024
This article or section is a Stub. You can help the Resonite Wiki by expanding it.
Component image
The ColliderUserTracker keeps track of users who enter and leave a collider. It must be used on a Slot that also has an attached Collider whose type is set to "Trigger".
As this component works on colliders, it cannot detect users in No-Clip.
Fields
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. |
TriggersOnly
|
Bool | |
IsLocalUserInside
|
raw output of Bool | Becomes set for the local user if the local user is within the collider of the object that this component is attached to. |
IsAnyUserInside
|
raw output of Bool | Becomes set for all users if any user is within the collider of the object that this component is attached to. |
NumberOfUsersInside
|
raw output of Int | Tracks the number of users inside the collider of the object that this component is attached to. |
_usersInside
|
direct SyncBag`1<UserRef> | Data on the users that are inside the collider of the object that this component is attached to. |
Usage
This article or section is a Stub. You can help the Resonite Wiki by expanding it.
This component can be very useful in defining zones in a world for various features, the most common of which is using the IsLocalUserInside bool to drive the Enabled state on various slots to work as a culling system.
Examples
This article or section is a Stub. You can help the Resonite Wiki by expanding it.