Move Mode and Mover
MoveMode Enum
Type of interpolation to use for movement
Syntax
[Sansar.Script.Interface] public enum MoveMode
Remarks
Movement is computed according to the movement type with a parametric parameter 't' that varies from zero to one.
Linear movement is directly proportional to 't'.
Ease-in movement is proportional to 't^2'.
Ease-out movement is computed with 't*(2-t)'.
Smoothstep interpolation uses '(3-2t)*t^2'.
Members
Member Name | Description |
---|---|
EaseIn | Ease In. The object with move slowly at first and quickly at the end. |
EaseOut | Ease Out. The object with move quickly at first and slow down at the end. |
Linear | Linear Interpolation. The object will move at a constant velocity. |
Smoothstep | Smoothstep Interpolation. The object with speed up and slow down smoothly when moving. |
Requirements
Namespace: Sansar.Simulation Assembly: Sansar.Simulation (in Sansar.Simulation.dll) Assembly Versions: 1.1.0.0
Mover Class
The Mover handles adding moves to process for an object.
Syntax
Member Details
AddMove Method
Sets the transform of this Mover to a target World Space position and rotation.
SyntaxParameters
position
The target position.
rotation
The target rotation.
Returns
The return value is an internal event id.
Remarks
RequirementsNamespace: Sansar.Simulation Assembly: Sansar.Simulation (in Sansar.Simulation.dll) Assembly Versions: 1.1.0.0
AddMove Method
Sets the transform of this Mover to a target World Space position and rotation.
SyntaxParameters
position
The target position.
rotation
The target rotation.
handler
Handler to be called when the event completes.
Returns
The return value is an internal event id.
Remarks
RequirementsNamespace: Sansar.Simulation Assembly: Sansar.Simulation (in Sansar.Simulation.dll) Assembly Versions: 1.1.0.0
AddMove Method
Translate and rotate the Mover to the target World Space position and rotation over time.
SyntaxParameters
targetPosition
The target position.
targetRotation
The target rotation.
timeInSeconds
The time in seconds to move over.
interpolationMode
The method of interpolation to use when moving
Returns
The return value is an internal event id.
Remarks
RequirementsNamespace: Sansar.Simulation Assembly: Sansar.Simulation (in Sansar.Simulation.dll) Assembly Versions: 1.1.0.0
AddMove Method
Translate and rotate the Mover to the target World Space position and rotation over time.
SyntaxParameters
targetPosition
The target position.
targetRotation
The target rotation.
timeInSeconds
The time in seconds to move over.
interpolationMode
The method of interpolation to use when moving
handler
Handler to be called when the event completes.
Returns
The return value is an internal event id.
Remarks
RequirementsNamespace: Sansar.Simulation Assembly: Sansar.Simulation (in Sansar.Simulation.dll) Assembly Versions: 1.1.0.0
AddMoveOffset Method
Sets the transform of this Mover to a target Local Space position and rotation.
SyntaxParameters
positionOffset
The local space position offset.
rotationOffset
The local space rotation offset.
Returns
The return value is an internal event id.
Remarks
RequirementsNamespace: Sansar.Simulation Assembly: Sansar.Simulation (in Sansar.Simulation.dll) Assembly Versions: 1.1.0.0
AddMoveOffset Method
Sets the transform of this Mover to a target Local Space position and rotation.
SyntaxParameters
positionOffset
The local space position offset.
rotationOffset
The local space rotation offset.
handler
Handler to be called when the event completes.
Returns
The return value is an internal event id.
Remarks
RequirementsNamespace: Sansar.Simulation Assembly: Sansar.Simulation (in Sansar.Simulation.dll) Assembly Versions: 1.1.0.0
AddMoveOffset Method
Translate and rotate the Mover to the target Local Space position and rotation over time.
SyntaxParameters
positionOffset
The local space position offset.
rotationOffset
The local space rotation offset.
timeInSeconds
The time in seconds to move over.
interpolationMode
The method of interpolation to use when moving
Returns
The return value is an internal event id.
Remarks
RequirementsNamespace: Sansar.Simulation Assembly: Sansar.Simulation (in Sansar.Simulation.dll) Assembly Versions: 1.1.0.0
AddMoveOffset Method
Translate and rotate the Mover to the target Local Space position and rotation over time.
SyntaxParameters
positionOffset
The local space position offset.
rotationOffset
The local space rotation offset.
timeInSeconds
The time in seconds to move over.
interpolationMode
The method of interpolation to use when moving
handler
Handler to be called when the event completes.
Returns
The return value is an internal event id.
Remarks
RequirementsNamespace: Sansar.Simulation Assembly: Sansar.Simulation (in Sansar.Simulation.dll) Assembly Versions: 1.1.0.0
AddPause Method
Adds a pause of the given length for this Mover.
Syntax[Sansar.Script.Interface] public void AddPause (double timeInSeconds)
Parameters
timeInSeconds
The amount of time in seconds that the movement should be paused.
Returns
The return value is an internal event id.
Remarks
RequirementsNamespace: Sansar.Simulation Assembly: Sansar.Simulation (in Sansar.Simulation.dll) Assembly Versions: 1.1.0.0
AddPause Method
Adds a pause of the given length for this Mover.
SyntaxParameters
timeInSeconds
The amount of time in seconds that the movement should be paused.
handler
Handler to be called when the event completes.
Returns
The return value is an internal event id.
Remarks
RequirementsNamespace: Sansar.Simulation Assembly: Sansar.Simulation (in Sansar.Simulation.dll) Assembly Versions: 1.1.0.0
AddRotate Method
Sets the rotation of this Mover to a target World Space rotation.
SyntaxParameters
rotation
The target rotation.
Returns
The return value is an internal event id.
Remarks
RequirementsNamespace: Sansar.Simulation Assembly: Sansar.Simulation (in Sansar.Simulation.dll) Assembly Versions: 1.1.0.0
AddRotate Method
Sets the rotation of this Mover to a target World Space rotation.
SyntaxParameters
rotation
The target rotation.
handler
Handler to be called when the event completes.
Returns
The return value is an internal event id.
Remarks
RequirementsNamespace: Sansar.Simulation Assembly: Sansar.Simulation (in Sansar.Simulation.dll) Assembly Versions: 1.1.0.0
AddRotate Method
Rotate the Mover to the target World Space rotation over time.
SyntaxParameters
targetRotation
The target rotation.
timeInSeconds
The time in seconds to move over.
interpolationMode
The method of interpolation to use when moving
Returns
The return value is an internal event id.
Remarks
RequirementsNamespace: Sansar.Simulation Assembly: Sansar.Simulation (in Sansar.Simulation.dll) Assembly Versions: 1.1.0.0
AddRotate Method
Rotate the Mover to the target World Space rotation over time.
SyntaxParameters
targetRotation
The target rotation.
timeInSeconds
The time in seconds to move over.
interpolationMode
The method of interpolation to use when moving
handler
Handler to be called when the event completes.
Returns
The return value is an internal event id.
Remarks
RequirementsNamespace: Sansar.Simulation Assembly: Sansar.Simulation (in Sansar.Simulation.dll) Assembly Versions: 1.1.0.0
AddRotateOffset Method
Sets the rotation of this Mover to a target Local Space rotation.
Syntax[Sansar.Script.Interface] public void AddRotateOffset (Sansar.Quaternion rotationOffset)
Parameters
rotationOffset
The local space rotation offset.
Returns
The return value is an internal event id.
Remarks
RequirementsNamespace: Sansar.Simulation Assembly: Sansar.Simulation (in Sansar.Simulation.dll) Assembly Versions: 1.1.0.0
AddRotateOffset Method
Sets the rotation of this Mover to a target Local Space rotation.
SyntaxParameters
rotationOffset
The local space rotation offset.
handler
Handler to be called when the event completes.
Returns
The return value is an internal event id.
Remarks
RequirementsNamespace: Sansar.Simulation Assembly: Sansar.Simulation (in Sansar.Simulation.dll) Assembly Versions: 1.1.0.0
AddRotateOffset Method
Rotate the Mover to the target Local Space rotation over time.
SyntaxParameters
rotationOffset
The local space rotation offset.
timeInSeconds
The time in seconds to move over.
interpolationMode
The method of interpolation to use when moving
Returns
The return value is an internal event id.
Remarks
RequirementsNamespace: Sansar.Simulation Assembly: Sansar.Simulation (in Sansar.Simulation.dll) Assembly Versions: 1.1.0.0
AddRotateOffset Method
Rotate the Mover to the target Local Space rotation over time.
SyntaxParameters
rotationOffset
The local space rotation offset.
timeInSeconds
The time in seconds to move over.
interpolationMode
The method of interpolation to use when moving
handler
Handler to be called when the event completes.
Returns
The return value is an internal event id.
Remarks
RequirementsNamespace: Sansar.Simulation Assembly: Sansar.Simulation (in Sansar.Simulation.dll) Assembly Versions: 1.1.0.0
AddTranslate Method
Sets the position of this Mover to a target World Space position.
Syntax[Sansar.Script.Interface] public void AddTranslate (Sansar.Vector position)
Parameters
position
The target position.
Returns
The return value is an internal event id.
Remarks
RequirementsNamespace: Sansar.Simulation Assembly: Sansar.Simulation (in Sansar.Simulation.dll) Assembly Versions: 1.1.0.0
AddTranslate Method
Sets the position of this Mover to a target World Space position.
SyntaxParameters
position
The target position.
handler
Handler to be called when the event completes.
Returns
The return value is an internal event id.
Remarks
RequirementsNamespace: Sansar.Simulation Assembly: Sansar.Simulation (in Sansar.Simulation.dll) Assembly Versions: 1.1.0.0
AddTranslate Method
Translate the Mover to the target World Space position over time.
Syntax[Sansar.Script.Interface] public void AddTranslate (Sansar.Vector targetPosition, double timeInSeconds, MoveMode interpolationMode)
Parameters
targetPosition
The target position.
timeInSeconds
The time in seconds to move over.
interpolationMode
The method of interpolation to use when moving.
Returns
The return value is an internal event id.
Remarks
RequirementsNamespace: Sansar.Simulation Assembly: Sansar.Simulation (in Sansar.Simulation.dll) Assembly Versions: 1.1.0.0
AddTranslate Method
Translate the Mover to the target World Space position over time.
SyntaxParameters
targetPosition
The target position.
timeInSeconds
The time in seconds to move over.
interpolationMode
The method of interpolation to use when moving.
handler
Handler to be called when the event completes.
Returns
The return value is an internal event id.
Remarks
RequirementsNamespace: Sansar.Simulation Assembly: Sansar.Simulation (in Sansar.Simulation.dll) Assembly Versions: 1.1.0.0
AddTranslateOffset Method
Sets the position of this Mover to a target Local Space position.
Syntax[Sansar.Script.Interface] public void AddTranslateOffset (Sansar.Vector positionOffset)
Parameters
positionOffset
The local space position offset.
Returns
The return value is an internal event id.
Remarks
RequirementsNamespace: Sansar.Simulation Assembly: Sansar.Simulation (in Sansar.Simulation.dll) Assembly Versions: 1.1.0.0
AddTranslateOffset Method
Sets the position of this Mover to a target Local Space position.
SyntaxParameters
positionOffset
The local space position offset.
handler
Handler to be called when the event completes.
Returns
The return value is an internal event id.
Remarks
RequirementsNamespace: Sansar.Simulation Assembly: Sansar.Simulation (in Sansar.Simulation.dll) Assembly Versions: 1.1.0.0
AddTranslateOffset Method
Translate the Mover to the target Local Space position over time.
Syntax[Sansar.Script.Interface] public void AddTranslateOffset (Sansar.Vector positionOffset, double timeInSeconds, MoveMode interpolationMode)
Parameters
positionOffset
The local space position offset.
timeInSeconds
The time in seconds to move over.
interpolationMode
The method of interpolation to use when moving.
Returns
The return value is an internal event id.
Remarks
RequirementsNamespace: Sansar.Simulation Assembly: Sansar.Simulation (in Sansar.Simulation.dll) Assembly Versions: 1.1.0.0
AddTranslateOffset Method
Translate the Mover to the target Local Space position over time.
SyntaxParameters
positionOffset
The local space position offset.
timeInSeconds
The time in seconds to move over.
interpolationMode
The method of interpolation to use when moving.
handler
Handler to be called when the event completes.
Returns
The return value is an internal event id.
Remarks
RequirementsNamespace: Sansar.Simulation Assembly: Sansar.Simulation (in Sansar.Simulation.dll) Assembly Versions: 1.1.0.0
IsMoving Property
Property to check if a move command is currently executing for this Mover.
Syntax[get: Sansar.Script.Interface] public bool IsMoving { get; }
Value
Whether or not this object is currently executing a move (includes pauses).
Remarks
RequirementsNamespace: Sansar.Simulation Assembly: Sansar.Simulation (in Sansar.Simulation.dll) Assembly Versions: 1.1.0.0
MoveCount Property
The number of move commands waiting to be excuted and currently executing for this Mover.
Syntax[get: Sansar.Script.Interface] public int MoveCount { get; }
Value
The number of enqueued move commands. Includes the current active move and any pause commands.
Remarks
RequirementsNamespace: Sansar.Simulation Assembly: Sansar.Simulation (in Sansar.Simulation.dll) Assembly Versions: 1.1.0.0
StopAndClear Method
Stops the current movement and clears any further movements for this Mover.
Syntax[Sansar.Script.Interface] public void StopAndClear ()
Returns
The return value is an internal event id.
RemarksThis method is not enqueued like other operations on the Mover. To block until the operation has executed, pass this method to Sansar.Script.ScriptBase.WaitFor while in a coroutine.
RequirementsNamespace: Sansar.Simulation Assembly: Sansar.Simulation (in Sansar.Simulation.dll) Assembly Versions: 1.1.0.0
StopAndClear Method
Stops the current movement and clears any further movements for this Mover.
SyntaxParameters
handler
Handler to be called when the event completes.
Returns
The return value is an internal event id.
RemarksThis method is not enqueued like other operations on the Mover. To block until the operation has executed, pass this method to Sansar.Script.ScriptBase.WaitFor while in a coroutine.
RequirementsNamespace: Sansar.Simulation Assembly: Sansar.Simulation (in Sansar.Simulation.dll) Assembly Versions: 1.1.0.0
ToString Method
A string representation of this object.
Syntax[Sansar.Script.Interface] public override string ToString ()
Returns
A string representation of this object.
Remarks
RequirementsNamespace: Sansar.Simulation Assembly: Sansar.Simulation (in Sansar.Simulation.dll) Assembly Versions: 1.1.0.0
Last updated