interface MoveListener


Listener for move actions. Callbacks are invoked as user interacts with the entity.

Summary

Public functions

open Unit
onMoveEnd(
    entity: Entity,
    finalInputRay: Ray,
    finalPose: Pose,
    finalScale: Float,
    updatedParent: Entity?
)

Called when the user has finished moving the entity.

open Unit
onMoveStart(
    entity: Entity,
    initialInputRay: Ray,
    initialPose: Pose,
    initialScale: Float,
    initialParent: Entity
)

Called when the user starts moving the entity.

open Unit
onMoveUpdate(
    entity: Entity,
    currentInputRay: Ray,
    currentPose: Pose,
    currentScale: Float
)

Called continuously while the user is moving the entity.

Public functions

onMoveEnd

Added in 1.0.0-alpha01
open fun onMoveEnd(
    entity: Entity,
    finalInputRay: Ray,
    finalPose: Pose,
    finalScale: Float,
    updatedParent: Entity?
): Unit

Called when the user has finished moving the entity.

Parameters
entity: Entity

The entity being moved.

finalInputRay: Ray

Ray for the user's input at the final update.

finalPose: Pose

Pose of the entity during this event relative to its parent.

finalScale: Float

Scale of the entity during this event.

updatedParent: Entity?

If anchorPlacement is set, the entity may have a new parent when the movement completes. This will be a new AnchorEntity, if it was anchored or re-anchored during the movement, or the activity space, if it was unanchored. This will be null if there was no updated parent on the entity.

onMoveStart

Added in 1.0.0-alpha01
open fun onMoveStart(
    entity: Entity,
    initialInputRay: Ray,
    initialPose: Pose,
    initialScale: Float,
    initialParent: Entity
): Unit

Called when the user starts moving the entity.

Parameters
entity: Entity

The entity being moved.

initialInputRay: Ray

Ray for the user's input at initial update.

initialPose: Pose

Initial Pose of the entity relative to its parent.

initialScale: Float

Initial scale of the entity.

initialParent: Entity

Initial parent of the entity.

onMoveUpdate

Added in 1.0.0-alpha01
open fun onMoveUpdate(
    entity: Entity,
    currentInputRay: Ray,
    currentPose: Pose,
    currentScale: Float
): Unit

Called continuously while the user is moving the entity.

Parameters
entity: Entity

The entity being moved.

currentInputRay: Ray

Ray for the user's input at the new update.

currentPose: Pose

Pose of the entity during this event relative to its parent.

currentScale: Float

Scale of the entity during this event.