EngageableObjectTracking Class |
Namespace: ImmerseSDK.Interaction
[UnityEngine.DisallowMultipleComponent] public class EngageableObjectTracking : LoggingBehaviour, IEngageableObject, IInteractableObject, ISupportDelayedStartup
The EngageableObjectTracking type exposes the following members.
Name | Description | |
---|---|---|
EngageableObjectTracking | Initializes a new instance of the EngageableObjectTracking class |
Name | Description | |
---|---|---|
ControllerTrackingEnabled |
True if controllers are tracking (this object is moving towards the controllers every frame)
| |
EngagingControllers |
The list of engaged controllers
| |
InteractionAllowed |
True if interaction is allowed, otherwise false
| |
InteractionPoint |
An alternative point to use for interaction calculations
| |
IsEngaged |
True if this object is currently engaged by one or more controllers
| |
IsKinematicAfterEngage |
Specifies how physics should behave after engagement ends
| |
RequiresTwoHands |
True if this object needs both hands to interact with
| |
Rigidbody |
The associated RigidBody
| |
Sensitivity |
Sensitivity of movement that is applied (acts like a dampener).
Note this is applied to both angular movement and positional movement.
| |
TargetTransform |
The transform to target
| |
TrackPosition |
Should controller position be tracked?
| |
TrackRotation |
Should controller rotation be tracked?
| |
Transform |
This object's Transform component
|
Name | Description | |
---|---|---|
Awake |
Unity Component Method
| |
Engage |
Attempt to Engage this object. If this is successfull, then a Ghost message is broadcast and the return value is true.
| |
FixedUpdate |
Unity Component Method
| |
GetAngularVelocityOfController |
Calculates the average angular velocity of all the engaging controllers
| |
GetDeltaWorldPositionToController |
Calculates the average delta distance moved by all the engaged controllers using world coordinates. Takes the interaction point into consideration if one was specified.
| |
GetDirectionOfMovementForPositionUpdate |
Default direction is from interaction point to controller
| |
GetTargetWorldPositionForController |
Returns the target position for this object based on the current engaging controller and interaction point
| |
GetVectorFromInteractionPointToController |
Calculates the distance from the interaction point (using the transform's position as default) to the average position of all the engaging controllers using world coordinates
| |
GetVelocityOfController |
Calculates the average velocity of all the engaging controllers using world coordinates
| |
IsMovementVelocityValid |
Checks whether the vector passed in is valid - checks for Nan, and that it's magnitude is greater than Mathf.Epsilon
| |
Mask |
Masks the specified vector by only allowing the axis specified
| |
MoveTowardControllerPosition |
Moves the object towards the average position of all the engaged controllers using physics in VR (in WebGL we will just set the position).
Note: world coordinates are used when doing calculations.
| |
MoveTowardControllerRotation |
Rotates the object towards the average rotation of all the engaged controllers using physics in VR (in WebGL we will just set the position)
| |
MoveTowards |
Moves this object by applying the velocity
| |
OnDrawGizmos |
Unity Component Method
| |
RequirementsMet |
Returns true if interaction is allowed, and interaction requirements are met.
| |
RestrictMovement |
Override this to restrict movement direction in some way. Default behavior is to return the direction unmodified.
| |
RestrictPosition |
Override this to restrict an object's position in some way. Default behavior is to return the target position unmodified.
| |
RotateTowardsControllerPositionPhysical |
Rotates the object towards the average rotation of all the engaged controllers using physics.
This rotation is also masked so only the world axis specified is used.
| |
RotateUsingControllerAngularVelocity |
Rotates the object using the average angular velocity of all the engaged controllers using physics.
This rotation is also masked so only the local axis specified is used.
| |
ShortVibrateController |
Used to trigger a small vibration for the user
| |
ShowHighlight |
Shows/Hides a highlight around the object
| |
ToggleDrag |
We reduce drag for smoother interaction. This method toggles it on or off
| |
TriggerShortControlerVibration |
Trigger a short vibration on the current engaged object
| |
UpdateDisplayForEngagement |
Called when this object's engagement state changes.
Override to implement any visual feedback required.
|
Name | Description | |
---|---|---|
_interactionPoint |
An alternative point to use for interaction calculations
| |
_interactionRequirements |
Requirements that has to be satisfied to allow interaction
| |
_isKinematicAfterEngage |
Specifies how physics should behave after engagement ends
| |
_requiresTwoHands |
Indicates whether this object needs to be engaged with by 2 controllers to move
| |
_requiresTwoHandsForUnsnapping |
Indicates whether this object needs to be engaged with by 2 controllers to unsnap
| |
_targetTransform |
The transform to target
| |
MaxDistanceToTravelUsingForces |
Caps the maximum distance to travel using forces (which gives smoother movement of held objects).
If this distance is breached, the object will teleport instead.
This value is also used for snapping.
|
Name | Description | |
---|---|---|
Disengage |
Disengage an engageable object
(Defined by EngagingExtensions.) | |
Engage |
Engage an engageable object. This will be a local/remote engagement based on it's type
(EngageableObject)
(Defined by EngagingExtensions.) | |
GetCopyOf |
Copies all properties of a component from source to target. Uses reflection to set properties.
(Defined by ComponentExtensions.) | |
IsAvailable |
Checks whether the target is available for interaction
(Defined by EngagingExtensions.) | |
WaitForT |
Waits for a singleton on a coroutine
(Defined by SingletonManager.) |