Abstract
Protected
_dragProtected
_planecastProtected
_previousReadonly
apiGeneric 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.
Protected
indirectA 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.
Protected
interactionCalled 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).
Readonly
sceneThe scene object 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.
Readonly
uniqueAbstract
activeReturns the targeting mode used to obtain the targeted interactable
Protected
currentProtected
currentReturns the current targeted interactable or null.
Protected
currentReturns the current trigger value
Returns the delta start position from previous frame
Abstract
directionReturns the direction the interactor's ray is pointing toward.
Abstract
distanceUsed to define the type of drag vector that the interactor is invoking. By default, interactor drag vectors will be as SixDof drags.
Abstract
drawif 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.
Abstract
endReturns the point where the interactor's ray ends.
Protected
inputDefines the interactor's input type. This can be used for prioritization or for discerning controller vs hands.
Abstract
interactionReturns a normalized value from 0-1, where 0 is the lowest strength and 1 the highest. Returns null if the strength cannot be computed.
Abstract
maxReturns the maximum raycast length for world targeting in cm
Abstract
orientationReturns the orientation of the interactor
Protected
planecastthe drag vector projected onto the plane defined by the current Interactable's forward and origin
Protected
previousProtected
previousReturns the previous targeted interactable or null.
Protected
previousReturns the previous trigger value
Abstract
startReturns the point where the interactor's ray starts.
Abstract
targetReturns the InteractableHitInfo describing the intersection with the current target This includes information such as the intersection position/normal, the Interactable, the collider, etc
Abstract
targetProtected
Abstract
clearClears the current Interactable, used when an Interactable is deleted at runtime
Protected
clearProjects 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.
Protected
getReturns the SceneObject the component is attached to.
Returns the Transform this component is attached to.
Static
getReturns the name of this object's type.
Protected
handleAbstract
isReturns true if the interactor is active
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.
Abstract
isReturns true if the interactor is actively targeting
Protected
processProcess 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
whether the input powering the interactor should be enabled
Protected
updateUpdates the targeting and trigger state of the interactor
Defines API for Interactor type