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|[[Type:Component|Component]]}}|TypeAdv1=true| Sources of Locomotion suppression. This will usually be a [[Component:AvatarAnchor|AvatarAnchor]].
|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| 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| A sync delegate to call and pass this locomotion controller as a reference to when this component Initializes.
|_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.
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.