Skip to content

YaInteractableComponent

YaInteractableComponent determines whether an object is interactable and the space in which the object is allowed to interact with players.

Functions

void EnableInteractable()
Enables the component.
void DisableInteractable()
Disables the component. When you disable it, all your settings won't take effect.
void SetInteractiveRange(number radius, number height)
Sets the space in which the object is allowed to interact with players. By default, the space is a sphere with radius. If you configure in YAHAHA Studio and specify a value for height, the space becomes a cylinder with radius and height.

Events

YaEntity PlayerContactEvent
Returns the YaEntity class, which acts as player Avatars who enter the interactable space.
YaEntity PlayerLeaveEvent
Returns the YaEntity class, which acts as player Avatars who leave the interactable space.