Tile - YAnimators - Aim To – Ylands

From Bohemia Interactive Community
Jump to navigation Jump to search
m (YlandsClassyBot moved page Ylands Tile - Aim to object to Ylands:Tile - YAnimators - Aim To: New Structure)
m (Text replacement - "{{DEFAULTSORT:{{#sub:{{PAGENAME}}|14}}}}" to "{{DEFAULTSORT:{{#sub:{{PAGENAME}}|7}}}}")
 
(2 intermediate revisions by one other user not shown)
Line 1: Line 1:
[[Image:Aim to object.png]]
<!---
*'''Animation''' script tile, which rotates selected '''object''' to '''target'''.
THIS PAGE WAS GENERATED AUTOMATICALLY; DO NOT EDIT IT, OTHERWISE YOUR CHANGES WILL BE LOST DURING FUTURE UPDATE.
*Both '''object''' and '''target''' can be entity, group or game logic.
-->
*'''Target offset''' defines offset of the '''aimed''' position. Further defined by the '''relative offset''' option.
== Aim To(Object, Target, Target offset, Relative offset, Max speed, Acceleration, Angle to start, Angle to end, X, Y, Z) ==
*'''Max speed''' and '''acceleration''' define the angular velocity properties of the animation.
 
*'''Angle to start/stop''' work similarly as '''distance to start/stop''' in [[Ylands Tile - Follow object|'''Follow object''']] animation script tile.
[[File:YlandsTile-607.png]]
*'''Axis''' options define, if the aiming rotation happens around selected axis.
 
<pre>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;</pre>
=== 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 ===
 
[[Ylands:Tile Availability - Server|Server]]
 
=== 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


NOTE: Object needs to be set to '''Animated'''.


----
----
{{Navbox/Ylands}}
{{Navbox/Ylands}}
{{DEFAULTSORT:{{#sub:{{PAGENAME}}|14}}}}
{{DEFAULTSORT:{{#sub:{{PAGENAME}}|7}}}}


[[Category: Instructions]]
[[Category: Instructions]]
[[Category: Ylands 0.13]]

Latest revision as of 14:24, 24 November 2023

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

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

Server

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