Class TransformInterpolateTowardsObjectBlock
- Namespace
- LunyScript.Blocks
- Assembly
- LunyScript.dll
Abstract base for Towards blocks whose target is an ILunyObject in the scene (Move and Rotate towards).
public abstract class TransformInterpolateTowardsObjectBlock : TransformInterpolateBlock, IScriptBlock
- Inheritance
-
objectTransformInterpolateTowardsObjectBlock
- Implements
- Derived
- Inherited Members
Constructors
TransformInterpolateTowardsObjectBlock(ILunyObject, double, double, LunyVector3, double)
protected TransformInterpolateTowardsObjectBlock(ILunyObject target, double speed, double deadZone, LunyVector3 axisLock, double responsiveness)
Parameters
targetILunyObjectspeeddoubledeadZonedoubleaxisLockLunyVector3responsivenessdouble
Fields
Target
protected readonly ILunyObject Target
Field Value
Methods
TowardsObjectToString()
protected string TowardsObjectToString()
Returns
- string
TryGetPositionDelta(IScriptRuntimeContext, out LunyVector3, out LunyVector3)
Computes the axis-masked position delta and masked target position. Returns false (and skips) when the distance is within the dead zone.
protected bool TryGetPositionDelta(IScriptRuntimeContext ctx, out LunyVector3 current, out LunyVector3 maskedTarget)
Parameters
ctxIScriptRuntimeContextcurrentLunyVector3maskedTargetLunyVector3
Returns
- bool
TryGetTargetRotation(IScriptRuntimeContext, out LunyQuaternion, out LunyQuaternion)
Computes the target rotation from the direction toward the target object. Returns false (and skips) when the direction is zero or the angle is within the dead zone.
protected bool TryGetTargetRotation(IScriptRuntimeContext ctx, out LunyQuaternion currentRotation, out LunyQuaternion targetRotation)
Parameters
ctxIScriptRuntimeContextcurrentRotationLunyQuaterniontargetRotationLunyQuaternion
Returns
- bool