Component:LocomotionController: Difference between revisions

From Resonite Wiki
Automated: create new component page
 
add info
 
(2 intermediate revisions by 2 users not shown)
Line 3: Line 3:
|Name=Locomotion Controller
|Name=Locomotion Controller
}}
}}
{{stub}}
The '''LocomotionController''' component is used on user root slots to allow user inputs to control Locomotion modules and switch between them. It also handles disabling them when they should be restrained.


== Usage ==
== Fields ==
{{Table ComponentFields
{{Table ComponentFields
|ScalingEnabled|Bool|
|ScalingEnabled|Bool| Whether the user is allowed to scale or not.
|SupressSources|{{RootFieldType|SyncRefList`1|[[Component:Component|Component]]}}|TypeAdv1=true|
|SupressSources|{{RootFieldType|SyncRefList`1|[[Type:Component|Component]]}}|TypeAdv1=true| Sources of Locomotion suppression. This will usually be a [[Component:AvatarAnchor|AvatarAnchor]].
|InputSupressSources|{{RootFieldType|SyncRefList`1|[[Component:Component|Component]]}}|TypeAdv2=true|
|InputSupressSources|{{RootFieldType|SyncRefList`1|[[Type:Component|Component]]}}|TypeAdv2=true| A list of Components that act as input control supressors.
|LocomotionModules|{{RootFieldType|SyncRefList`1|[[Type:ILocomotionModule|ILocomotionModule]]}}|TypeAdv3=true|
|LocomotionModules|{{RootFieldType|SyncRefList`1|[[Type:ILocomotionModule|ILocomotionModule]]}}|TypeAdv3=true| A list of locomotions the user can switch between and use.
|ActiveModuleIndex|Int|
|ActiveModuleIndex|Int| The current locomotion module being used.
|SyncActiveLocomotionModule|Bool|
|FindUserPreferredModule|Bool| Whether to automatically use the user's preferred locomotion in [[Settings]].
|_currentGroundCollider|ICollider|
|_currentGroundCollider|ICollider| the current object that the user is standing on (supporting ground or slope)
|_lastGroundCollider|ICollider|
|_lastGroundCollider|ICollider| The previous collider the user was standing on before they started nocliping or otherwise.
|OnInitialized|{{RootFieldType|SyncDelegate`1|[[Type:Action`1|Action`1]]<[[Component:LocomotionController|LocomotionController]]>}}|TypeAdv8=true|
|OnInitialized|{{RootFieldType|SyncDelegate`1|[[Type:Action`1|Action`1]]<[[Component:LocomotionController|LocomotionController]]>}}|TypeAdv8=true| A sync delegate to call and pass this locomotion controller as a reference to when this component Initializes.
|_parentHierarchy|{{RootFieldType|SyncRefList`1|[[Type:Slot|Slot]]}}|TypeAdv9=true|
|_parentHierarchy|{{RootFieldType|SyncRefList`1|[[Type:Slot|Slot]]}}|TypeAdv9=true| A list of slots that are parents of this component.
|_dummyCharacterController|'''[[Component:CharacterController|CharacterController]]'''|TypeAdv10=true|
|_dummyCharacterController|'''[[Component:CharacterController|CharacterController]]'''|TypeAdv10=true| The character controller to use when there is no locomotion. Is found on User root.
}}
}}


== Behavior ==
== Usage ==
Used internally by user systems made in a user slot on spawn.


== Examples ==
== Examples ==
Line 28: Line 29:
[[Category:Components:Uncategorized{{#translation:}}|Locomotion Controller]]
[[Category:Components:Uncategorized{{#translation:}}|Locomotion Controller]]
[[Category:Components{{#translation:}}|Locomotion Controller]]
[[Category:Components{{#translation:}}|Locomotion Controller]]
[[Category:ComponentStubs]]

Latest revision as of 19:50, 25 June 2025

Component image 
Locomotion Controller component as seen in the Scene Inspector

The LocomotionController component is used on user root slots to allow user inputs to control Locomotion modules and switch between them. It also handles disabling them when they should be restrained.

Fields

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. Some components stop their functionality when this field is disabled, but some don't.
ScalingEnabled Bool Whether the user is allowed to scale or not.
SupressSources list of Component Sources of Locomotion suppression. This will usually be a AvatarAnchor.
InputSupressSources list of Component A list of Components that act as input control supressors.
LocomotionModules list of ILocomotionModule A list of locomotions the user can switch between and use.
ActiveModuleIndex Int The current locomotion module being used.
FindUserPreferredModule Bool Whether to automatically use the user's preferred locomotion in Settings.
_currentGroundCollider ICollider the current object that the user is standing on (supporting ground or slope)
_lastGroundCollider ICollider The previous collider the user was standing on before they started nocliping or otherwise.
OnInitialized delegate of identity Action`1<LocomotionController> A sync delegate to call and pass this locomotion controller as a reference to when this component Initializes.
_parentHierarchy list of Slot A list of slots that are parents of this component.
_dummyCharacterController CharacterController The character controller to use when there is no locomotion. Is found on User root.

Usage

Used internally by user systems made in a user slot on spawn.

Examples

See Also