API reference
API reference
Select your platform
No SDKs available
No versions available

ThrowWhenUnselected Class

Extends ITimeConsumer, IDisposable
Tracks the movement of a rigidbody while it is selected by an IPointable and applies a throw velocity when it becomes fully unselected.

Events

Callback triggered when the object sets the throwing velocities of the referenced rigidbody

Constructors & Destructors

Sets the function that provides with the time in order to measure the velocities of the rigidbody
Parameters
timeProvider
The function that provides the time
Sets the Rigidbody used for the throw velocity calculation
Parameters
rigidbody
The rigidbody to apply velocity to and measure deltas from
Delegate signature for the loaded velocities
Parameters
velocity
Linear velocity
torque
Angular velocity
Creates a new instance that listens to the provided IPointable events.
Note that this instance must be disposed via .Dispose() to release the event listener.
Parameters
rigidbody
The rigidbody to track velocity from and throw.
pointable
The IPointable indicating when the rigidbody is selected and unselected.
Unregisters the instance from the IPointable events
Retrieves the current tracked velocity of the rigidbody
Parameters
velocity
Linear velocity
torque
Angular velocity
Returns
True if the velocities could be retrieved
Did you find this page helpful?