Game logic - Animator rotation – Ylands

From Bohemia Interactive Community
Jump to navigation Jump to search
No edit summary
m (Text replacement - "[[File:{{PAGENAME}}.png|right|400px|Properties]]↵" to "<!-- [[File:{{PAGENAME}}.png|right|400px|Properties]] --> ")
 
(7 intermediate revisions by the same user not shown)
Line 1: Line 1:
=Description=
=Description=
Game logic used to specify rotation animation which can be then assigned onto "dynamic" objects. When an object has active animator assigned it will execute that movement until the animator is unassigned or disabled. When the objects finishes one movement cycle an [[Ylands Tile - Animator On Cycle End|'''End Cycle Event''']] spawned (if enabled).
Game logic used to specify rotation animation which can be then assigned onto "dynamic" objects. When an object has active animator assigned it will execute that movement until the animator is unassigned or disabled. When the objects finishes one movement cycle an [[Ylands:Tile - Animator On Cycle End|'''End Cycle Event''']] spawned (if enabled).


===Important Note===
=== Important Note ===
*Any dynamic object can have '''only one''' [[Ylands Game logic - Animator position|'''Position''']] '''and''' one [[Ylands Game logic - Animator rotation|'''Rotation''']] animator '''assigned''' at time.
*Any dynamic object can have '''only one''' [[Ylands:Game logic - Animator position|'''Position''']] '''and''' one [[Ylands:Game logic - Animator rotation|'''Rotation''']] animator '''assigned''' at time.
*When new Rotation Animator is assigned to an object, it will stop the current movement and start movement defined in new animator.
*When new Rotation Animator is assigned to an object, it will stop the current movement and start movement defined in new animator.


=Properties=
= Properties =
[[File:{{PAGENAME}}.png|right|400px|Properties]]
<!-- [[File:{{PAGENAME}}.png|right|400px|Properties]] -->


===Rotation===
=== Rotation ===
*'''Align with movement''' - Object rotation will automatically align with its movement.
*'''Align with movement''' - Object rotation will automatically align with its movement.
*'''Rotation reference''' - Rotation defined by reference point(s)
*'''Rotation reference''' - Rotation defined by reference point(s)


===Align with movement===
=== Align with movement ===
*'''Immediate''' - Whenever rotation change will take effect immediately or not
*'''Immediate''' - Whenever rotation change will take effect immediately or not
**'''Max speed''' - Maximum rotation speed (deg/sec)
**'''Max speed''' - Maximum rotation speed (deg/sec)
Line 20: Line 20:
*'''X / Y / Z''' - Allows to constrain alignment to only specific axes
*'''X / Y / Z''' - Allows to constrain alignment to only specific axes


===Rotation reference===
=== Rotation reference ===
*'''Around reference point''' - Simple rotation
*'''Around reference point''' - Simple rotation
**'''Reference point''' -  Reference point used as rotation axis.
**'''Reference point''' -  Reference point used as rotation axis.
Line 30: Line 30:
**'''End point''' -  Reference point defining rotation end.
**'''End point''' -  Reference point defining rotation end.


===Loop===  
=== Loop ===
*'''Ping pong''' - Object rotation will bounce from start to end and back.
*'''Ping pong''' - Object rotation will bounce from start to end and back.
*'''Repeated''' - Object rotation will repeat only from start to end.
*'''Repeated''' - Object rotation will repeat only from start to end.


===Movement===  
=== Movement ===
*'''Speed''' - Velocity of movement in degrees per second.
*'''Speed''' - Velocity of movement in degrees per second.
*'''Time''' -  How many seconds the movement (one cycle) should take.
*'''Time''' -  How many seconds the movement (one cycle) should take.
*'''Smoothing''' -  Defines if the movement is linear or accelerated. 0 = constant speed, 1 = fully smoothed from start to end
*'''Smoothing''' -  Defines if the movement is linear or accelerated. 0 = constant speed, 1 = fully smoothed from start to end


===Space===  
=== Space ===
*'''Absolute''' - Object will move in absolute coordinates as defined in animator.
*'''Absolute''' - Object will move in absolute coordinates as defined in animator.
*'''Relative''' - Object movement will be relative to its current rotation.
*'''Relative''' - Object movement will be relative to its current rotation.


===Other===  
=== Other ===
*'''Spawn animator events''' -  Whenever the animator will spawn appropriate events or not
*'''Spawn animator events''' -  Whenever the animator will spawn appropriate events or not


=Animator events=
= Animator events =
*[[Ylands Tile - Animator On Cycle End|On Animator Cycle End]]
*[[Ylands:Tile - Animator On Cycle End|On Animator Cycle End]]


=Related instructions=
= Related instructions =
*[[Ylands Tile - Get-Set rotation animator|Get / Set Rotation Animator]]
*[[Ylands:Tile - Get-Set rotation animator|Get / Set Rotation Animator]]




----
----
{{Ylands scripting navbox}}
{{Navbox/Ylands}}
{{DEFAULTSORT:{{#sub:{{PAGENAME}}|19}}}}
{{DEFAULTSORT:{{#sub:{{PAGENAME}}|13}}}}


[[Category: Game Logic]]
[[Category: Game Logic]]
[[Category: Ylands 0.13]]
[[Category: Ylands 0.13]]

Latest revision as of 21:16, 8 August 2024

Description

Game logic used to specify rotation animation which can be then assigned onto "dynamic" objects. When an object has active animator assigned it will execute that movement until the animator is unassigned or disabled. When the objects finishes one movement cycle an End Cycle Event spawned (if enabled).

Important Note

  • Any dynamic object can have only one Position and one Rotation animator assigned at time.
  • When new Rotation Animator is assigned to an object, it will stop the current movement and start movement defined in new animator.

Properties

Rotation

  • Align with movement - Object rotation will automatically align with its movement.
  • Rotation reference - Rotation defined by reference point(s)

Align with movement

  • Immediate - Whenever rotation change will take effect immediately or not
    • Max speed - Maximum rotation speed (deg/sec)
    • Acceleration - Rotation acceleration (deg/sec^2)
  • Rotation offset - Local offset for rotated entity
  • X / Y / Z - Allows to constrain alignment to only specific axes

Rotation reference

  • Around reference point - Simple rotation
    • Reference point - Reference point used as rotation axis.
    • Angle - Rotation length in degrees
    • Rotation offset - Local offset for rotated entity
  • Between reference points
    • Start point - Reference point defining starting rotation.
    • End point - Reference point defining rotation end.

Loop

  • Ping pong - Object rotation will bounce from start to end and back.
  • Repeated - Object rotation will repeat only from start to end.

Movement

  • Speed - Velocity of movement in degrees per second.
  • Time - How many seconds the movement (one cycle) should take.
  • Smoothing - Defines if the movement is linear or accelerated. 0 = constant speed, 1 = fully smoothed from start to end

Space

  • Absolute - Object will move in absolute coordinates as defined in animator.
  • Relative - Object movement will be relative to its current rotation.

Other

  • Spawn animator events - Whenever the animator will spawn appropriate events or not

Animator events

Related instructions