EntityMoveListener


interface EntityMoveListener


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-alpha05
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 ActivitySpace, if it was unanchored. This will be null if there was no updated parent on the Entity.

onMoveStart

Added in 1.0.0-alpha05
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-alpha05
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

Proposed Pose of the Entity during this event relative to its parent.

currentScale: Float

Proposed scale of the Entity during this event relative to its parent.