Tile - YAnimators - Aim To – Ylands

From Bohemia Interactive Community
Jump to navigation Jump to search

Aim To(Object, Target, Target offset, Relative offset, Max speed, Acceleration, Angle to start, Angle to end, X, Y, Z)

YlandsTile-607.png

static aimTo(obj: YEntity | YLogic | YGroup, targetObject: YEntity | YLogic | YGroup, offset: YVector3, offsetIsRelative: boolean, maxSpeed: number, acceleration: number, distanceToStartRotation: number, distanceToEndRotation: number, x: boolean, y: boolean, z: boolean): void;

Parameters

obj

targetObject

offset

offsetIsRelative

maxSpeed

acceleration

distanceToStartRotation

distanceToEndRotation

x

y

z

Description

Selected animated object will rotate to aim to the target.

Notes

  • The aim to instruction will stop when it reaches the angle to end, and start again when the distance is greater than angle to start
  • Every time the ain to stops or starts, animator events are spawned