Automated: create new component page |
add info |
||
(2 intermediate revisions by 2 users not shown) | |||
Line 3: | Line 3: | ||
|Name=Touch Value Option`1 | |Name=Touch Value Option`1 | ||
}} | }} | ||
The '''TouchValueOption''' component allows you to set a field to a value on press, it can drive indicators for Active and Hovering. | |||
== | == Fields == | ||
{{Table ComponentFields | {{Table ComponentFields | ||
|Target|{{RootFieldType|RelayRef`1|[[Type:IField`1|IField`1]]<T>}}|TypeAdv0=true| | |Target|{{RootFieldType|RelayRef`1|[[Type:IField`1|IField`1]]<T>}}|TypeAdv0=true| The field to set. | ||
|Value|'''T'''|TypeAdv1=true| | |Value|'''T'''|TypeAdv1=true| The value to set <code>Target</code> to. | ||
|ActiveIndicator|{{RootFieldType|FieldDrive`1|[[Type:Bool|Bool]]}}|TypeAdv2=true| | |ActiveIndicator|{{RootFieldType|FieldDrive`1|[[Type:Bool|Bool]]}}|TypeAdv2=true| The field to drive with whether '''T''' in <code>Target</code> equals <code>Value</code>. | ||
|HoverIndicator|{{RootFieldType|FieldDrive`1|[[Type:Bool|Bool]]}}|TypeAdv3=true| | |HoverIndicator|{{RootFieldType|FieldDrive`1|[[Type:Bool|Bool]]}}|TypeAdv3=true| The field to drive with whether this button is being hovered over via laser. | ||
|HoverVibrate|VibratePreset| | |HoverVibrate|VibratePreset| How to vibrate haptics on the hand that is hovering over this option. | ||
|Vibrate|VibratePreset| | |Vibrate|VibratePreset| How to vibrate haptics on the hand that is pressing this option. | ||
|SetOnTouchBegin|Bool| | |SetOnTouchBegin|Bool| Whether to set the '''T''' in <code>Target</code> to <code>Value</code> upon start touching this component. | ||
|SetOnTouchStay|Bool| | |SetOnTouchStay|Bool| Whether to set the '''T''' in <code>Target</code> to <code>Value</code> every frame while keeping touching this component. | ||
|SetOnTouchEnd|Bool| | |SetOnTouchEnd|Bool| Whether to set the '''T''' in <code>Target</code> to <code>Value</code> upon end touching this component. | ||
|AcceptOutOfSightTouch|Bool| | |AcceptOutOfSightTouch|Bool| {{Template:Touchable_AcceptOutOfSightTouch}} | ||
|AcceptPhysicalTouch|Bool| | |AcceptPhysicalTouch|Bool| {{Template:Touchable_AcceptPhysicalTouch}} | ||
|AcceptRemoteTouch|Bool| | |AcceptRemoteTouch|Bool| {{Template:Touchable_AcceptRemoteTouch}} | ||
|EditModeOnly|Bool| | |EditModeOnly|Bool| Whether this component can only be interacted with if the user is in edit mode. | ||
|ActiveUserRootOnly|Bool| | |ActiveUserRootOnly|Bool| Whether only the active user of this component can interact with this component. | ||
}} | }} | ||
== | == Usage == | ||
Needs a static collider on the same slot in order to work. Attach to said slot and provide a field for it to set in <code>Target</code>. | |||
== Examples == | == Examples == | ||
{{stub}} | |||
== See Also == | == See Also == | ||
* [[Component:TouchToggle]] | |||
[[Category:Components:Transform:Interaction{{#translation:}}|Touch Value Option`1]] | [[Category:Components:Transform:Interaction{{#translation:}}|Touch Value Option`1]] | ||
[[Category:Components{{#translation:}}|Touch Value Option`1]] | [[Category:Components{{#translation:}}|Touch Value Option`1]] | ||
[[Category:Generic Components{{#translation:}}|Touch Value Option`1]] | [[Category:Generic Components{{#translation:}}|Touch Value Option`1]] | ||
Latest revision as of 18:03, 5 February 2025
Component image 
Touch Value Option`1 component as seen in the Scene Inspector

The TouchValueOption component allows you to set a field to a value on press, it can drive indicators for Active and Hovering.
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. |
Target
|
direct RelayRef`1<IField`1<T>> | The field to set. |
Value
|
T | The value to set Target to.
|
ActiveIndicator
|
field drive of Bool | The field to drive with whether T in Target equals Value .
|
HoverIndicator
|
field drive of Bool | The field to drive with whether this button is being hovered over via laser. |
HoverVibrate
|
VibratePreset | How to vibrate haptics on the hand that is hovering over this option. |
Vibrate
|
VibratePreset | How to vibrate haptics on the hand that is pressing this option. |
SetOnTouchBegin
|
Bool | Whether to set the T in Target to Value upon start touching this component.
|
SetOnTouchStay
|
Bool | Whether to set the T in Target to Value every frame while keeping touching this component.
|
SetOnTouchEnd
|
Bool | Whether to set the T in Target to Value upon end touching this component.
|
AcceptOutOfSightTouch
|
Bool | Whether or not to allow interaction with this component if it is out of the user's view. |
AcceptPhysicalTouch
|
Bool | Whether to allow Component:TipTouchSources to interact with/activate this component. |
AcceptRemoteTouch
|
Bool | Whether this component allows interaction via the user's interaction laser. |
EditModeOnly
|
Bool | Whether this component can only be interacted with if the user is in edit mode. |
ActiveUserRootOnly
|
Bool | Whether only the active user of this component can interact with this component. |
Usage
Needs a static collider on the same slot in order to work. Attach to said slot and provide a field for it to set in Target
.
Examples
This article or section is a Stub. You can help the Resonite Wiki by expanding it.