Tile - YAnimators - Rotate To – Ylands
Jump to navigation
Jump to search
Rotate To(Object, Rotation, Time, Smoothing)
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
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)
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
Description
Rotates the animated object to the target rotation at specified speed.
Notes
- Smoothing will smooth the start and end of the movement.