Component:PhysicalButton: Difference between revisions

From Resonite Wiki
m minor fixes to the spacing and layout this page, as well as a basic introduction to the core concept of the component.
m removed needless introduction header
Line 6: Line 6:
|Image=PhysicalButtonComponent.png
|Image=PhysicalButtonComponent.png
|Name=Physical Button
|Name=Physical Button
}}
}}The PhysicalButton component can be used to create buttons that move inward when pressed by a user, a press depth and threshold can be set to customize the physical feeling of the button.  
 
== Introduction ==
The PhysicalButton component can be used to create buttons that move inward when pressed by a user, a press depth and threshold can be set to customize the physical feeling of the button.  


== Fields ==
== Fields ==

Revision as of 05:11, 14 January 2024


This article or section is a Stub. You can help the Resonite Wiki by expanding it.


Component image 
Physical Button component as seen in the Scene Inspector

The PhysicalButton component can be used to create buttons that move inward when pressed by a user, a press depth and threshold can be set to customize the physical feeling of the button.

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.
PressAxis Float3
AcceptPhysicalTouch Bool
AcceptRemoteTouch Bool
AcceptOutOfSightTouch Bool
EditModeOnly Bool
ActiveUserFilter ActiveUserHandling
__legacyActiveUserRootOnly Bool
Pressed WorldDelegate
Pressing WorldDelegate
Released WorldDelegate
PressDepth Float
PressThreshold Float
ReleaseThreshold Float
IsPressed Bool
IsHovering Bool
BeginPressVibration VibratePreset
PressVibration VibratePreset
HoverVibration VibratePreset
Label IField<string>
_currentPressingDepth Float
_buttonOffset Float3
_buttonPosition IField<float3>

Usage

Examples

Related Components

Miscellaneous Notes

When adding this component to an object that has the Grabbable component, you will notice that the object may not be grabbable anymore. To remedy this, create a child object on the main object you want to be your button. Then, on that child object, attach this component. You should now have an object that is grabbable and functions as a button.