{{stub}}'''See [[Component:Slider`1]] for the UIX Slider component.'''{{Infobox Component
{{Infobox Component
|Image=SliderComponent.png
|Image=SliderComponent.png
|Name=Slider
|Name=Slider
}}
}}
== Intoduction ==
The '''Slider''' component allows for an object to be grabbed and moved. See [[#Usage|Usage]] for more information.
== Usage ==
{{Note|If you need a 2D slider for [[UIX]] as an element, see the [[Component:Slider`1|UIX Slider]] component.|suggestion}}
== Fields ==
{{Table ComponentFields
{{Table ComponentFields
|EditModeOnly|Bool|
|EditModeOnly|Bool| Determines if this grabbable is effective only in [[Edit Mode]]
|AllowSteal|Bool|
|AllowSteal|Bool| Other users can grab the slot this component is attached to. Like a flag in capture the flag.
|DropOnDisable|Bool|
|DropOnDisable|Bool| The parent slot will be dropped when this component is disabled.
|DontDrive|Bool|
|DontDrive|Bool| Write the transforms every game tick, rather than driving it on the local machine and then sending the final value to the host.
|AllowOnlyPhysicalGrab|Bool|
|AllowOnlyPhysicalGrab|Bool| Only allow grab an object with a physical interaction - remote grabs are not allowed
|ActiveUserFilter|ActiveUserHandling|
|ActiveUserFilter|ActiveUserHandling| Changes if this component can be grabbed based on who is the active user if any.
|CustomGrabCheck|GrabCheck|
|CustomGrabCheck|{{RootFieldType|SyncDelegate`1|[[Type:GrabCheck|GrabCheck]]}}|TypeAdv6=true| ''Not Usable inside Resonite'' Requires a mod for interacting with [[Sync Delegates]]
|_grabber|Grabber|
|_grabber|'''[[Component:Grabber|Grabber]]'''|TypeAdv7=true| ''Automatically Assigned'', the grabber that is grabbing this component.
|_holdSlot|Slot|
|_holdSlot|Slot| The slot that is "holding" this slot, but not actually acting as this slider's parent.
|_pos|Float3|
|_pos|{{RootFieldType|DriveRef`1|[[Type:Sync`1|Sync`1]]<[[Type:Float3|Float3]]>}}|TypeAdv9=true| The field this is currently driving for position.
|_rot|FloatQ|
|_rot|{{RootFieldType|DriveRef`1|[[Type:Sync`1|Sync`1]]<[[Type:FloatQ|FloatQ]]>}}|TypeAdv10=true| The field this is currently driving for rotation.
|_scl|Float3|
|_scl|{{RootFieldType|DriveRef`1|[[Type:Sync`1|Sync`1]]<[[Type:Float3|Float3]]>}}|TypeAdv11=true| The field this is currently driving for scale.
|__legacyActiveUserRootOnly|Bool|
|__legacyActiveUserRootOnly|Bool| ''Automatically Assigned'' Legacy do not use. Used to handle whether only the active user can grab. Use <code>ActiveUserFilter</code> instead!
|GrabPriority|Int| {{Template:Grab Priority}}
|GrabPriority|Int| {{Template:Grab Priority}}
|Rotatable|Bool|
|Rotatable|Bool| Whether the slider object is rotatable.
|Scalable|Bool|
|Scalable|Bool| Whether the slider is scalable.
|Range|Float3|
|Range|Float3| The range that the object is allowed to move position wise.
|Origin|Float3|
|Origin|Float3| The origin of the range that the object is allowed to move.
|MinScale|Float3|
|MinScale|Float3| The minimum scale the object can be scaled to.
|MaxScale|Float3|
|MaxScale|Float3| The maximum scale the object can be scaled to.
|VibrationOffset|Float|
|VibrationOffset|Float| The offset of the vibration intensity.
|VibrationPreset|VibratePreset|
|VibrationPreset|VibratePreset| The preset for triggering vibration with this object.
|SnapIncrement|Float|
|SnapIncrement|Float| What increment the position of this object should snap to, instead of allowing smooth movement.
|SnapTime|Float|
|SnapTime|Float| The time the object will take to move to a snap position when it snaps.
|SnapOnRelease|Bool|
|SnapOnRelease|Bool| Only snap to positions in <code>SnapPositions</code> when released rather than always.
|SnapPositions|SnapPosition|
|SnapPositions|{{RootFieldType|SyncList`1|[[#SnapPosition|Slider.SnapPosition]]}}|TypeAdv25=true| Positions to snap to while grabbing or when released.
|posOffset|Float3|
|posOffset|Float3| How much to offset the slider's position.
|rotOffset|FloatQ|
|rotOffset|FloatQ| How much to offset the slider's rotation.
|scaleReference|Float3|
|scaleReference|Float3| The original scale reference value.
|referenceParent|Slot|
|referenceParent|Slot| The slot that is supposed to be this slider's parent.
}}
== SnapPosition ==
{{Table TypeFields
|Position|Float3| The position to snap to and measure distance from.
|MaxDistance|Float| The distance the slider needs to be under from <code>Position</code> in local transforms to snap to it.
}}
}}
== Behavior ==
== Usage ==
This can be used for NPC pickups, grabbing objects and moving them without parenting under a user, or for sliding doors. this can also be used for physical sliders like on audio boards like mixers.
== Examples ==
== Examples ==
* [https://www.youtube.com/watch?v=9Ynl-d0l81E Slider - A useful alternative to Grabbable] by [[User:ProbablePrime|ProbablePrime]]
Slider - A useful alternative to Grabbable - by [[User:ProbablePrime|ProbablePrime]]:
Determines what gets grabbed if several grabbable objects are touching someone's grab sphere. The IGrabbable with the highest priority will be grabbed first. If the highest priority ties with another IGrabbable, it will grab both of those and ignore any lower priority IGrabbables.
The distance the slider needs to be under from Position in local transforms to snap to it.
Usage
This can be used for NPC pickups, grabbing objects and moving them without parenting under a user, or for sliding doors. this can also be used for physical sliders like on audio boards like mixers.
Examples
Slider - A useful alternative to Grabbable - by ProbablePrime: