Table of Contents

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
object
TransformInterpolateTowardsObjectBlock
Implements
Derived
Inherited Members

Constructors

TransformInterpolateTowardsObjectBlock(ILunyObject, double, double, LunyVector3, double)

protected TransformInterpolateTowardsObjectBlock(ILunyObject target, double speed, double deadZone, LunyVector3 axisLock, double responsiveness)

Parameters

target ILunyObject
speed double
deadZone double
axisLock LunyVector3
responsiveness double

Fields

Target

protected readonly ILunyObject Target

Field Value

ILunyObject

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

ctx IScriptRuntimeContext
current LunyVector3
maskedTarget LunyVector3

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

ctx IScriptRuntimeContext
currentRotation LunyQuaternion
targetRotation LunyQuaternion

Returns

bool