Preparing search index...

    This class provides manipulation capabilities for interactable objects, including translation, rotation, and scaling. It allows configuration of the manipulation root, scale limits, and rotation axes.

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    api: Record<string, any>

    Generic object accessible by other instances of ScriptComponent. Use this object to store references to properties and methods that need to be accessible from other ScriptComponents.

    This property is no longer needed, you can use a reference to the ScriptComponent, including 'script', directly

    enabled: boolean

    If disabled, the Component will stop enacting its behavior.

    enableStretchZ: boolean = true
    isEnabledInHierarchy: boolean

    Returns true if this Component, its SceneObject, and all of that SceneObjects parents are enabled.

    isSynced: boolean = false
    maximumScaleFactor: number = 20

    The largest this object can scale up to, relative to its original scale. A value of 2 means it cannot scale larger than twice its original size.

    minimumScaleFactor: number = 0.25
    name: string
    onManipulationEnd: PublicApi<TransformEventArg> = ...

    Callback for when any manipulation ends

    onManipulationStart: PublicApi<TransformEventArg> = ...

    Callback for when any manipulation begins

    onManipulationUpdate: PublicApi<TransformEventArg> = ...

    Callback for when any manipulation updates

    onRotationEnd: PublicApi<RotationEventArg> = ...

    Callback for when rotation has ended

    onRotationStart: PublicApi<RotationEventArg> = ...

    Callback for when rotation begins

    onRotationUpdate: PublicApi<RotationEventArg> = ...

    Callback for when rotation updates each frame

    onScaleEnd: PublicApi<ScaleEventArg> = ...

    Callback for when scale has ended

    onScaleLimitReached: PublicApi<ScaleLimitEventArg> = ...

    Callback for when scale has reached the minimum or maximum limit

    onScaleStart: PublicApi<ScaleEventArg> = ...

    Callback for when scale begins

    onScaleUpdate: PublicApi<ScaleEventArg> = ...

    Callback for when scale updates each frame

    onTranslationEnd: PublicApi<TranslateEventArg> = ...

    Callback for when translation has ended

    onTranslationStart: PublicApi<TranslateEventArg> = ...

    Callback for when translation begins

    onTranslationUpdate: PublicApi<TranslateEventArg> = ...

    Callback for when translation updates each frame

    sceneObject: SceneObject

    The SceneObject this component is on.

    showRotationProperties: boolean = false

    Controls the visibility of rotation options in the Inspector.

    showTranslationProperties: boolean = false
    uniqueIdentifier: string
    updatePriority: number
    useFilter: boolean = true
    zStretchFactorMax: number = 12.0

    The maximum multiplier applied to Z-axis movement when using stretch mode. This value is used when objects are far away from the user. Higher values allow faster positioning of distant objects with minimal hand movement.

    zStretchFactorMin: number = 1.0

    The minimum multiplier applied to Z-axis movement when using stretch mode. This value is used when objects are close to the user. Higher values result in more responsive depth movement for nearby objects.

    Accessors

    • get enableXTranslation(): boolean

      Returns if translation along world X-axis is enabled.

      Returns boolean

    • set enableXTranslation(enabled: boolean): void

      Set if translation along world X-axis is enabled.

      Parameters

      • enabled: boolean

      Returns void

    • get enableYTranslation(): boolean

      Returns if translation along world Y-axis is enabled.

      Returns boolean

    • set enableYTranslation(enabled: boolean): void

      Set if translation along world Y-axis is enabled.

      Parameters

      • enabled: boolean

      Returns void

    • get enableZTranslation(): boolean

      Returns if translation along world Z-axis is enabled.

      Returns boolean

    • set enableZTranslation(enabled: boolean): void

      Set if translation along world Z-axis is enabled.

      Parameters

      • enabled: boolean

      Returns void

    • get rotationAxis(): RotationAxis

      Get if rotation occurs about all axes or a single world axis (x,y,z) when using to two hands..

      Returns RotationAxis

    • set rotationAxis(axis: RotationAxis): void

      Set if rotation occurs about all axes or a single world axis (x,y,z) when using to two hands.

      Parameters

      Returns void

    Methods

    • Returns true if any of rotation x, y, or z is enabled

      Returns boolean

    • Returns true if any of scale x, y, or z is enabled

      Returns boolean

    • Returns true translation is enabled

      Returns boolean

    • Gets the transform of the root of the manipulated object(s).

      Returns Transform

    • Returns true if the object is currently being actively manipulated (i.e., in the Active state).

      Returns boolean

    • Returns true if the object matches or derives from the passed in type.

      Parameters

      • type: string

      Returns boolean

    • Returns void

    • Returns void

    • Resets the interactable's position

      Parameters

      • local: boolean = false

      Returns void

    • Resets the interactable's rotation

      Parameters

      • local: boolean = false

      Returns void

    • Resets the interactable's scale

      Parameters

      • local: boolean = false

      Returns void

    • Resets the interactable's transform

      Parameters

      • local: boolean = false

      Returns void

    • Toggle for allowing an object to rotate

      Parameters

      • enabled: boolean

      Returns void

    • Toggle for allowing an object to scale

      Parameters

      • enabled: boolean

      Returns void

    • Toggle for allowing an object to translate

      Parameters

      • enabled: boolean

      Returns void

    • Sets the transform of the passed SceneObject as the root of the manipulated object(s).

      Parameters

      Returns void

    • Set a new Interactable component to the InteractableManipulation. This will cleanup the existing callbacks and setup new ones for the new Interactable. Be sure to call this if there is no Interactable component on the SceneObject.

      Parameters

      • interactable: Interactable

        The new Interactable component to set.

      Returns void

    • Updates the starting transform values mid-manipuation if some other script has displaced, rotated, or scaled the object during the interaction.

      Returns void

    • Returns void