Tile - YAnimators - Rotate To – Ylands

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "{{Ylands editor navbox}}" to "{{Navbox/Ylands}}")
m (Text replacement - "{{DEFAULTSORT:{{#sub:{{PAGENAME}}|14}}}}" to "{{DEFAULTSORT:{{#sub:{{PAGENAME}}|7}}}}")
 
(3 intermediate revisions by one other user not shown)
Line 1: Line 1:
[[Image:Rotate object.png]]
<!---
*'''Animation''' script tile, which rotates selected '''object''' to '''target''' rotation coordinates.
THIS PAGE WAS GENERATED AUTOMATICALLY; DO NOT EDIT IT, OTHERWISE YOUR CHANGES WILL BE LOST DURING FUTURE UPDATE.
*'''Object''' can be entity, group or game logic.
-->
*'''Time''' defines how many seconds should it take to perform the animation.
== Rotate To(Object, Rotation, Time, Smoothing) ==
*'''Speed''' opposite to time, defines how quickly should the animation be performed.
 
*'''Smoothing''' is a number 0-1.
[[File:YlandsTile-604.png]]
**At 0, the rotation is completely smooth with no acceleration.
 
**At 1, the speed peaks at the middle, accelerating from the start and slowing towards the end.
<pre>static rotateToTime(obj: YEntity | YLogic | YGroup, targetRotation: YVector3, time: number, smoothing: number): void;</pre>
=== Parameters ===
 
==== obj ====
 
Target object
 
==== targetRotation ====
 
Target rotation (vector)
 
==== time ====
 
Rotation movement duration (seconds)
 
==== smoothing ====
 
Rotation movement smoothing (0-1)
 
=== Availability ===
 
[[Ylands:Tile Availability - Server|Server]]
 
=== Description ===
 
Rotates the animated '''object''' to the target '''rotation''' in specified '''time'''.
 
=== Notes ===
 
* '''Smoothing''' will smooth the start and end of the movement.
 
== Rotate To(Object, Rotation, Speed, Smoothing) ==
 
[[File:YlandsTile-605.png]]
 
<pre>static rotateToSpeed(obj: YEntity | YLogic | YGroup, targetRotation: YVector3, speed: number, smoothing: number): void;</pre>
=== Parameters ===
 
==== obj ====
 
Target object
 
==== targetRotation ====
 
Target rotation (vector)
 
==== speed ====
 
Rotation movement speed (deg/s)
 
==== smoothing ====
 
Movement smoothing (0-1)
 
=== Availability ===
 
[[Ylands:Tile Availability - Server|Server]]
 
=== Description ===
 
Rotates the animated '''object''' to the target '''rotation''' at specified '''speed'''.
 
=== Notes ===
 
* '''Smoothing''' will smooth the start and end of the movement.


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

Rotate To(Object, Rotation, Time, Smoothing)

YlandsTile-604.png

static rotateToTime(obj: YEntity | YLogic | YGroup, targetRotation: YVector3, time: number, smoothing: number): void;

Parameters

obj

Target object

targetRotation

Target rotation (vector)

time

Rotation movement duration (seconds)

smoothing

Rotation movement smoothing (0-1)

Availability

Server

Description

Rotates the animated object to the target rotation in specified time.

Notes

  • Smoothing will smooth the start and end of the movement.

Rotate To(Object, Rotation, Speed, Smoothing)

YlandsTile-605.png

static rotateToSpeed(obj: YEntity | YLogic | YGroup, targetRotation: YVector3, speed: number, smoothing: number): void;

Parameters

obj

Target object

targetRotation

Target rotation (vector)

speed

Rotation movement speed (deg/s)

smoothing

Movement smoothing (0-1)

Availability

Server

Description

Rotates the animated object to the target rotation at specified speed.

Notes

  • Smoothing will smooth the start and end of the movement.