Tile - YAnimators - Aim To – Ylands
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
Line 10: | Line 10: | ||
==== obj ==== | ==== obj ==== | ||
Target object to be rotated | |||
==== targetObject ==== | ==== targetObject ==== | ||
Target object to aim to | |||
==== offset ==== | ==== offset ==== | ||
Position offset from the target object (vector) | |||
==== offsetIsRelative ==== | ==== offsetIsRelative ==== | ||
Whether is the offset relative to the target orientation | |||
==== maxSpeed ==== | ==== maxSpeed ==== | ||
Maximum rotation movement speed (deg/s) | |||
==== acceleration ==== | ==== acceleration ==== | ||
Rotation movement acceleration (deg/s^2) | |||
==== distanceToStartRotation ==== | ==== distanceToStartRotation ==== | ||
Minimal angle difference from target to resume the movement (deg) | |||
==== distanceToEndRotation ==== | ==== distanceToEndRotation ==== | ||
Maximal angle difference from target to end the movement (deg) | |||
==== x ==== | ==== x ==== | ||
Allow rotation around object X axis (pitch) | |||
==== y ==== | ==== y ==== | ||
Allow rotation around object Y axis (yaw) | |||
==== z ==== | ==== z ==== | ||
Allow rotation around object Z axis (roll) | |||
=== Availability === | |||
[[Ylands:Tile Availability - Server|Server]] | |||
=== Description === | === Description === | ||
Rotates selected '''animated object''' towards '''target''' object. | |||
=== Notes === | === 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'' | * 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 | * Every time the aim to stops or starts, '''animator events''' are spawned | ||
Revision as of 11:15, 12 November 2021
Aim To(Object, Target, Target offset, Relative offset, Max speed, Acceleration, Angle to start, Angle to end, X, Y, Z)
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
Target object to be rotated
targetObject
Target object to aim to
offset
Position offset from the target object (vector)
offsetIsRelative
Whether is the offset relative to the target orientation
maxSpeed
Maximum rotation movement speed (deg/s)
acceleration
Rotation movement acceleration (deg/s^2)
distanceToStartRotation
Minimal angle difference from target to resume the movement (deg)
distanceToEndRotation
Maximal angle difference from target to end the movement (deg)
x
Allow rotation around object X axis (pitch)
y
Allow rotation around object Y axis (yaw)
z
Allow rotation around object Z axis (roll)
Availability
Description
Rotates selected animated object towards target object.
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 aim to stops or starts, animator events are spawned