Struct TransformBuilder
- Namespace
- LunyScript
- Assembly
- LunyScript.dll
public readonly struct TransformBuilder
Methods
LookAt(ILunyObject)
Instantly orient to face the target.
Chain .WorldUp(v), .LockX(), .LockY(), .LockZ() then call .Do().
public TransformLookAtBuilder<TransformBuilderReady> LookAt(ILunyObject target)
Parameters
targetILunyObject
Returns
MoveBack(VariableBlock, VariableBlock)
Forward/Backward based on orientation.
public TransformPositionMoveRelativeBlock MoveBack(VariableBlock amount, VariableBlock speed = null)
Parameters
amountVariableBlockspeedVariableBlock
Returns
MoveBy(VariableBlock<LunyVector2>, VariableBlock)
Forward/Backward based on orientation.
public TransformPositionMoveByBlock MoveBy(VariableBlock<LunyVector2> direction, VariableBlock speed = null)
Parameters
directionVariableBlock<LunyVector2>speedVariableBlock
Returns
MoveDown(VariableBlock, VariableBlock)
Sideways relative to orientation.
public TransformPositionMoveRelativeBlock MoveDown(VariableBlock amount, VariableBlock speed = null)
Parameters
amountVariableBlockspeedVariableBlock
Returns
MoveForward(VariableBlock, VariableBlock)
Forward/Backward based on orientation.
public TransformPositionMoveRelativeBlock MoveForward(VariableBlock amount, VariableBlock speed = null)
Parameters
amountVariableBlockspeedVariableBlock
Returns
MoveLeft(VariableBlock, VariableBlock)
Sideways relative to orientation.
public TransformPositionMoveRelativeBlock MoveLeft(VariableBlock amount, VariableBlock speed = null)
Parameters
amountVariableBlockspeedVariableBlock
Returns
MoveRight(VariableBlock, VariableBlock)
Sideways relative to orientation.
public TransformPositionMoveRelativeBlock MoveRight(VariableBlock amount, VariableBlock speed = null)
Parameters
amountVariableBlockspeedVariableBlock
Returns
MoveTowards(ILunyObject)
Move toward the target position each frame.
Chain .Speed(n), .Responsiveness(n), .DeadZone(n), .LockX/Y/Z()
then call .Do() (linear), .Lerp() or .Slerp().
public TransformPositionBuilder<TransformBuilderReady> MoveTowards(ILunyObject target)
Parameters
targetILunyObject
Returns
MoveUp(VariableBlock, VariableBlock)
Sideways relative to orientation.
public TransformPositionMoveRelativeBlock MoveUp(VariableBlock amount, VariableBlock speed = null)
Parameters
amountVariableBlockspeedVariableBlock
Returns
RotateTowards(ILunyObject)
Rotate toward the target orientation each frame.
Chain .Speed(n), .Responsiveness(n), .DeadZone(n), .LockX/Y/Z()
then call .Do() (degrees/sec), .Lerp() or .Slerp().
public TransformRotationBuilder<TransformBuilderReady> RotateTowards(ILunyObject target)
Parameters
targetILunyObject
Returns
ScaleTowards(VariableBlock<LunyVector3>)
Scale toward the target scale each frame.
Chain .Speed(n), .Responsiveness(n), .DeadZone(n), .LockX/Y/Z()
then call .Do() (linear), .Lerp() or .Slerp().
public TransformScaleBuilder<TransformBuilderReady> ScaleTowards(VariableBlock<LunyVector3> targetScale)
Parameters
targetScaleVariableBlock<LunyVector3>
Returns
SetLocalPosition(VariableBlock<LunyVector3>)
Instantly set the Local position.
public TransformPositionSetLocalBlock SetLocalPosition(VariableBlock<LunyVector3> position)
Parameters
positionVariableBlock<LunyVector3>
Returns
SetLocalRotation(LunyVector3)
Instantly set the Local rotation.
public TransformRotationSetLocalBlock SetLocalRotation(LunyVector3 eulerAngles)
Parameters
eulerAnglesLunyVector3
Returns
SetLocalRotation(VariableBlock<LunyQuaternion>)
Instantly set the Local rotation.
public TransformRotationSetLocalBlock SetLocalRotation(VariableBlock<LunyQuaternion> rotation)
Parameters
rotationVariableBlock<LunyQuaternion>
Returns
SetLocalScale(VariableBlock)
public TransformScaleSetLocalBlock SetLocalScale(VariableBlock scale)
Parameters
scaleVariableBlock
Returns
SetLocalScale(VariableBlock<LunyVector3>)
Instantly set the Local scale.
public TransformScaleSetLocalBlock SetLocalScale(VariableBlock<LunyVector3> scale)
Parameters
scaleVariableBlock<LunyVector3>
Returns
SetLocalScale(double)
Instantly set the Local scale.
public TransformScaleSetLocalBlock SetLocalScale(double scale)
Parameters
scaledouble
Returns
SetPosition(VariableBlock<LunyVector3>)
Instantly set the World position.
public TransformPositionSetWorldBlock SetPosition(VariableBlock<LunyVector3> position)
Parameters
positionVariableBlock<LunyVector3>
Returns
SetRotation(LunyVector3)
Instantly set the World rotation.
public TransformRotationSetWorldBlock SetRotation(LunyVector3 eulerAngles)
Parameters
eulerAnglesLunyVector3
Returns
SetRotation(VariableBlock<LunyQuaternion>)
Instantly set the World rotation.
public TransformRotationSetWorldBlock SetRotation(VariableBlock<LunyQuaternion> rotation)
Parameters
rotationVariableBlock<LunyQuaternion>
Returns
ShiftBack(VariableBlock, VariableBlock)
Forward/backward on the World forward axis.
public TransformPositionMoveRelativeBlock ShiftBack(VariableBlock amount, VariableBlock speed = null)
Parameters
amountVariableBlockspeedVariableBlock
Returns
ShiftBy(VariableBlock<LunyVector2>, VariableBlock)
Forward/Backward based on orientation.
public TransformPositionMoveByBlock ShiftBy(VariableBlock<LunyVector2> direction, VariableBlock speed = null)
Parameters
directionVariableBlock<LunyVector2>speedVariableBlock
Returns
ShiftDown(VariableBlock, VariableBlock)
Up/Down on the World up axis.
public TransformPositionMoveRelativeBlock ShiftDown(VariableBlock amount, VariableBlock speed = null)
Parameters
amountVariableBlockspeedVariableBlock
Returns
ShiftForward(VariableBlock, VariableBlock)
Forward/backward on the World forward axis.
public TransformPositionMoveRelativeBlock ShiftForward(VariableBlock amount, VariableBlock speed = null)
Parameters
amountVariableBlockspeedVariableBlock
Returns
ShiftLeft(VariableBlock, VariableBlock)
Left/Right on the World right axis.
public TransformPositionMoveRelativeBlock ShiftLeft(VariableBlock amount, VariableBlock speed = null)
Parameters
amountVariableBlockspeedVariableBlock
Returns
ShiftRight(VariableBlock, VariableBlock)
Left/Right on the World right axis.
public TransformPositionMoveRelativeBlock ShiftRight(VariableBlock amount, VariableBlock speed = null)
Parameters
amountVariableBlockspeedVariableBlock
Returns
ShiftUp(VariableBlock, VariableBlock)
Up/Down on the World up axis.
public TransformPositionMoveRelativeBlock ShiftUp(VariableBlock amount, VariableBlock speed = null)
Parameters
amountVariableBlockspeedVariableBlock