Interactable
This component belongs to the following package:
- com.yahaha.sdk.props
The Interactable component enables player interaction with game objects. It allows for multiple interaction types through attached plug-ins and can be used alongside other components on the same object.
Properties
- Enabled: Toggles the component's functionality. When disabled, the system will search for Interactable components on parent objects.
- Interactive Distance: Sets the maximum distance at which players can interact with this object. Players must be within this range to trigger interactions. Default: 2.
- Enable Hightlight: Determines whether to enable highlight outline.
- Highlight Thickness: Determines then thickness of the highlight outline. Default: 0.02.
- Highlight Brightness: Determines then brightness of the highlight outline. Default: 0.18.
- Mask Type: Determines the mask type, which controls the occlusion of the hightlight outline. Disabled by default.
- Hightlight Color: Determines the color of the highlight outline.
- Plug-ins: List of components to interact with. Add a plug-in component to this object first before selecting it here.
- Plug-in: The picked interaction component.
Trigger
Events:
- com.yahaha.sdk.props.OnInteraction
- EventArgs:
Condition:
- InteractionEnabled
- Returns:
- value: boolean
- Returns:
Action:
- Enable
- Disable
- OnHighlightOn
- OnHighlightOff
Related components
This component is usually used with:
- Prop, which enables an object to become a prop in gameplay.
- Socket, which allows specific items to be inserted into a designated position
- Inspectable, which allows items to become inspectable.
- Draggable, which allows items to be draggable.
- Placeable, which enables items to be placed into the scene.