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
Expand Details ...
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

Type Name Description
ILunyObject
target
Double
speed
Double
deadZone
LunyVector3
axisLock
Double
responsiveness

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 Boolean TryGetPositionDelta(IScriptRuntimeContext ctx, out LunyVector3 current, out LunyVector3 maskedTarget)

Parameters

Type Name Description
IScriptRuntimeContext
ctx
LunyVector3
current
LunyVector3
maskedTarget

Returns

Boolean

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 Boolean TryGetTargetRotation(IScriptRuntimeContext ctx, out LunyQuaternion currentRotation, out LunyQuaternion targetRotation)

Parameters

Type Name Description
IScriptRuntimeContext
ctx
LunyQuaternion
currentRotation
LunyQuaternion
targetRotation

Returns

Boolean