Protected_Protected_Protected_Protected_Protected_ReadonlyapiGeneric 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.
If disabled, the Component will stop enacting its behavior.
ProtectedindirectA multiplier applied to spherecast radii when using indirect targeting. Larger values create wider targeting areas, making it easier to target objects at the expense of precision. Smaller values provide more precise targeting.
ProtectedinteractionReadonlyisReturns true if this Component, its SceneObject, and all of that SceneObjects parents are enabled.
Called whenever the Interactor changes the target Interactable
Called whenever the Interactor is lost and was in a triggered state (regardless of if there is a target or not).
Called whenever the Interactor exits the triggered state (regardless of if there is a target or not).
Called whenever the Interactor enters the triggered state (regardless of if there is a target or not).
Called whenever the Interactor remains in the triggered state (regardless of if there is a target or not).
ReadonlysceneThe SceneObject this component is on.
Defines distance offsets (in cm) from the ray origin for performing sphere casts. Each value creates a sphere cast starting point at [ray origin + (direction * offset)]. Used in sequence with spherecastRadii, with the system trying progressively larger sphere casts until a target is found. Helps improve targeting of small or distant objects. Must have the same array length as spherecastRadii.
Defines the radii (in cm) used for progressive spherecasting when raycast fails to hit a target. Used in sequence with spherecastDistanceThresholds to perform increasingly larger sphere casts until a target is found. Smaller radii provide more precise targeting while larger radii help target small or distant objects. Must have the same array length as spherecastDistanceThresholds.
ReadonlyuniqueReturns the targeting mode used to obtain the targeted interactable
ProtectedcurrentProtectedcurrentReturns the current targeted interactable or null.
ProtectedcurrentReturns the current trigger value
Returns the delta start position from previous frame
Returns the direction the interactor's ray is pointing toward.
Used to define the type of drag vector that the interactor is invoking. By default, interactor drag vectors will be as SixDof drags.
if the Interactor is currently drawing a debug gizmo of collider/raycasts in the scene.
Set if the Interactor is should draw a debug gizmo of collider/raycasts in the scene.
Returns true if the interaction ended inside the Interactable it started in. Updated when an interaction ends.
Returns the point where the interactor's ray ends.
Returns a list of Interactables that the Interactor is hovering (targeting ray intersects w/ Interactable's collider).
ProtectedinputDefines the interactor's input type. This can be used for prioritization or for discerning controller vs hands.
Returns a normalized value from 0-1, where 0 is the lowest strength and 1 the highest. Returns null if the strength cannot be computed.
Returns true if the Interactor is hovering the current Interactable in the current frame.
Returns if the Interactor is in some generic triggering state in the current frame.
Returns the maximum raycast length for world targeting in cm
Returns the orientation of the interactor
Protectedplanecastthe drag vector projected onto the plane defined by the current Interactable's forward and origin
ProtectedpreviousProtectedpreviousReturns the previous targeted interactable or null.
ProtectedpreviousReturns the previous trigger value
Returns the point where the interactor's ray starts.
Returns the InteractableHitInfo describing the intersection with the current target This includes information such as the intersection position/normal, the Interactable, the collider, etc
Returns true if the Interactor was hovering the current Interactable in the previous frame.
Returns if the Interactor was in some generic triggering state in the previous frame.
ProtectedclearClears the current Interactable, used when an Interactable is deleted at runtime
ProtectedclearProjects the direct collider's position onto the plane defined by the Interactable's forward vector / origin
the Interactable used to define the plane of intersection
the direct collider's position projected onto the plane
Adds a new SceneEvent, triggered by eventType events, to the ScriptComponent.
Notifies that the Interactor has changed target Interactable
Destroys the component.
ProtectedgetReturns the SceneObject the component is attached to.
Returns the Transform this component is attached to.
StaticgetReturns the name of this object's type.
ProtectedhandleReturns true if the interactor is active
Returns true if the Interactor is hovering over the given Interactable. An Interactor can hover over multiple overlapping Interactables at once, but only the most deeply nested Interactable will receive the official onHover events.
This is useful for creating custom behaviors when receiving onHoverEnter/Exit events during trigger.
the Interactable to check for
Returns true if the Interactor is hovering over the given Interactable or any of its Interactable descendants. An Interactor can hover over multiple overlapping Interactables at once, but only the most deeply nested Interactable will receive the official onHover events.
This is useful for creating custom behaviors when receiving onHoverEnter/Exit events during trigger.
the Interactable to check for
Returns true if the object matches or derives from the passed in type.
Returns true if this object is the same as other. Useful for checking if two references point to the same thing.
Returns true if the interactor is actively targeting
Projects the given position onto the plane defined by the Interactable's forward vector / origin
the Interactable used to define the plane of intersection
the world position to project onto the plane
the direct collider's position projected onto the plane
ProtectedprocessProcess the new currentTrigger and compare to previousTrigger to see what event to propagate.
Calculates the intersection of the Interactor's indirect raycast and the plane defined by the Interactable's forward vector / origin
the Interactable used to define the plane of intersection
the intersection point of the indirect raycast and plane
Removes a previously added SceneEvent from the ScriptComponent.
Disables or enables the input powering this interactor
ProtectedupdateUpdates the targeting and trigger state of the interactor
Interactor implementation used for touch bases interactions to interact with Interactable components with the mouse cursor in preview window of Lens Studio
There are no events for mouse hover in Lens Studio so this class uses some technics to achieve both hover and trigger events.