Tile - YAnimators - Follow – Ylands
Jump to navigation
Jump to search
(Created page with " ---- {{Ylands scripting navbox}} {{DEFAULTSORT:{{#sub:{{PAGENAME}}|14}}}} Category: Instructions Category: Ylands 0.13") |
Lou Montana (talk | contribs) m (Text replacement - "{{DEFAULTSORT:{{#sub:{{PAGENAME}}|14}}}}" to "{{DEFAULTSORT:{{#sub:{{PAGENAME}}|7}}}}") |
||
(10 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
<!--- | |||
THIS PAGE WAS GENERATED AUTOMATICALLY; DO NOT EDIT IT, OTHERWISE YOUR CHANGES WILL BE LOST DURING FUTURE UPDATE. | |||
--> | |||
== Follow(Object, Target, Target offset, Relative offset, Max speed, Acceleration, Distance to start, Distance to end) == | |||
[[File:YlandsTile-606.png]] | |||
<pre>static follow(obj: YEntity | YLogic | YGroup, targetObject: YEntity | YLogic | YGroup, offset: YVector3, offsetIsRelative: boolean, maxSpeed: number, acceleration: number, distanceToStartMovement: number, distanceToEndMovement: number): void;</pre> | |||
=== Parameters === | |||
==== obj ==== | |||
Target object to be moved | |||
==== targetObject ==== | |||
Target object to be followed | |||
==== offset ==== | |||
Position offset from the target object (vector) | |||
==== offsetIsRelative ==== | |||
Whether is the offset relative to the target orientation | |||
==== maxSpeed ==== | |||
Maximum movement speed (m/s) | |||
==== acceleration ==== | |||
Movement acceleration (m/s^2) | |||
==== distanceToStartMovement ==== | |||
Minimal distance from target to resume the movement (meters) | |||
==== distanceToEndMovement ==== | |||
Maximal distance from target to end the movement (meters) | |||
=== Availability === | |||
[[Ylands:Tile Availability - Server|Server]] | |||
=== Description === | |||
Moves selected '''animated object''' towards '''target''' object. | |||
=== Notes === | |||
* Offset can be set as relative, that will apply the offset in the objects local space (takes into account the objects rotation) | |||
* The movement will stop when it reaches the '''distance to end''', and start again when the distance is greater than ''distance to start'' | |||
* Every time the follow stops or starts, '''animator events''' are spawned | |||
---- | ---- | ||
{{Ylands | {{Navbox/Ylands}} | ||
{{DEFAULTSORT:{{#sub:{{PAGENAME}}| | {{DEFAULTSORT:{{#sub:{{PAGENAME}}|7}}}} | ||
[[Category: Instructions]] | [[Category: Instructions]] | ||
Latest revision as of 14:24, 24 November 2023
Follow(Object, Target, Target offset, Relative offset, Max speed, Acceleration, Distance to start, Distance to end)
static follow(obj: YEntity | YLogic | YGroup, targetObject: YEntity | YLogic | YGroup, offset: YVector3, offsetIsRelative: boolean, maxSpeed: number, acceleration: number, distanceToStartMovement: number, distanceToEndMovement: number): void;
Parameters
obj
Target object to be moved
targetObject
Target object to be followed
offset
Position offset from the target object (vector)
offsetIsRelative
Whether is the offset relative to the target orientation
maxSpeed
Maximum movement speed (m/s)
acceleration
Movement acceleration (m/s^2)
distanceToStartMovement
Minimal distance from target to resume the movement (meters)
distanceToEndMovement
Maximal distance from target to end the movement (meters)
Availability
Description
Moves selected animated object towards target object.
Notes
- Offset can be set as relative, that will apply the offset in the objects local space (takes into account the objects rotation)
- The movement will stop when it reaches the distance to end, and start again when the distance is greater than distance to start
- Every time the follow stops or starts, animator events are spawned