API reference
API reference
Select your platform
No SDKs available
No versions available

HitState Enum

Represents the current interaction state between a controller ray and a target entity in the InputStateMachine. Transitions follow a state diagram: IDLE_UP → HOVER (on enter) → PRESSED (on press) → FIRE (on release over target), with HELD_OUTSIDE for presses that drag away from the target. The state machine evaluates these transitions each frame based on ray intersection and button input.

Signature

enum HitState : Enum<HitState> 

Enumeration Constants

MemberDescription
IDLE_UP
No controller ray is intersecting any target entity and no button is pressed. The default resting state for the input state machine.
IDLE_DOWN
No target entity is under the ray but a button is pressed. Occurs when the user presses a controller button without pointing at any interactive entity.
HOVER
The controller ray is intersecting a target entity but no button is pressed. Triggers onHoverStart on the scene object when entering this state.
HOVER_PRESSED
The controller ray entered a target entity while a button was already held from a press initiated outside the entity boundary.
PRESSED
A button was pressed while hovering over a target entity. Triggers onPress on the scene object and begins tracking the press interaction.
HELD_OUTSIDE
The button is still held but the ray has moved off the originally pressed target entity. The press is tracked but will not trigger a fire event.
FIRE
The button was released while the ray was still over the originally pressed target entity. Triggers onClick on the scene object, completing the click interaction cycle.