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

PanelInputListener

PanelInputListener

class PanelInputListener(ctx: SpatialContext, clickButtons: Int, scene_: Scene) : InputListener
Internal input handler for panels that translates 3D spatial input to Android MotionEvents.
Converts controller interactions in 3D space into appropriate touch and scroll events that can be dispatched to a panel’s Android View. Handles input locking, haptic feedback, and scroll behavior.

Constructors

NameSummary
PanelInputListener
constructor(ctx: SpatialContext, clickButtons: Int, scene_: Scene)

Types

NameSummary
Companion
object Companion

Functions

NameSummary
onClick
open fun onClick(receiver: SceneObject, hitInfo: HitInfo, sourceOfInput: Entity)

Called when a "click" is released while pointing at the object. This is a trigger release for controllers, and a pinch release for hands.
onClickDown
open fun onClickDown(receiver: SceneObject, hitInfo: HitInfo, sourceOfInput: Entity)

Called when a "clickDown" is processed while pointing at the object. This is a trigger press for controllers, and a pinch for hands.
onHoverStart
open fun onHoverStart(receiver: SceneObject, sourceOfInput: Entity)

Called when the pointer starts hovering over the object.
onHoverStop
open fun onHoverStop(receiver: SceneObject, sourceOfInput: Entity)

Called when the pointer stops hovering over the object.
onInput
open override fun onInput(receiver: SceneObject, hitInfo: HitInfo, sourceOfInput: Entity, changedIn: Int, buttonState: Int, downTime: Long): Boolean

Called when any input event occurs on the object. It provides raw button state information through bit masks that can be interpreted using ButtonBits constants.
onPointerEvent
open fun onPointerEvent(receiver: SceneObject, hitInfo: HitInfo, type: Int, sourceOfInput: Entity, scrollInfo: Vector2, semanticType: Int)

Called for pointer events on the SceneObject.
stopInput
open override fun stopInput(receiver: SceneObject, sourceOfInput: Entity, downTime: Long)

Called when input interaction with a SceneObject stops. This will be called once the controller stops hovering, or if a button is held down, when the button is released.

Companion

object Companion
Did you find this page helpful?
Thumbs up icon
Thumbs down icon