8,799
edits
mNo edit summary |
m (extended little further) |
||
Line 1: | Line 1: | ||
The real world is full of motion. To simulate this in [[FlightGear]], '''models must be animated'''. | |||
This document provides basic information for all kind of animations. For more complex animations, you are advised to check the available [[aircraft]] for examples. | |||
==Special code parts== | |||
===Axis=== | |||
An axis part is required in every animation that involves a rotating or moving thing. | |||
<axis> | |||
<x>0</x> | |||
<y>1</y> | |||
<z>0</z> | |||
</axis> | |||
The axis are similar to the ones of the 3D model. There is a difference between rotation and translation: | |||
* In rotation animations, the axis part defines around what axis the object rotates. Negative/positive values make the difference between counterclockwise and clockwise rotations. | |||
* In translate animations, the part defines along what axis the object moves. If the x-axis is poiting backwards, an x-value of -1 will result in forward motion. | |||
===Center=== | |||
<nowiki><center></nowiki> | |||
<x-m>-1.50</x-m> | |||
<y-m> 1 </y-m> | |||
<z-m> 0.25</z-m> | |||
<nowiki></center></nowiki> | |||
The axis are similar to the ones of the 3D model, so finding coordinates is easily done in 3D modeling software. | |||
===Conditions=== | ===Conditions=== | ||
Multiple animations can make use of a conditional. | Multiple animations can make use of a conditional. | ||
Line 61: | Line 87: | ||
</animation> | </animation> | ||
== | ==Animation types== | ||
===Pick=== | ===Pick=== | ||
{{Main article|Howto: Make a clickable panel#Pick}} | {{Main article|Howto: Make a clickable panel#Pick}} | ||
Line 169: | Line 195: | ||
* '''factor:''' | * '''factor:''' | ||
* '''step:''' | * '''step:''' | ||
property * factor * step = the amount of pixels that the texture should be translated. If your texture is 256 pixels, an textranslate of 0.1 will result in the texture moving with 26 pixels, into the direction specified by the axis settings. | property * factor * step * texture width/height = the amount of pixels that the texture should be translated. If your texture is 256 pixels, an textranslate of 0.1 will result in the texture moving with 26 pixels, into the direction specified by the axis settings. | ||
===Timed=== | ===Timed=== | ||
Line 184: | Line 210: | ||
===Translate=== | ===Translate=== | ||
The same as [[#Textranslate|textranslate]], but this animation moves a whole object (so including fixed textures). The example below will move an object 5 meters in the y-direction. | |||
<animation> | |||
<type>translate</type> | |||
<object-name>Object</object-name> | |||
<property>controls/seat/pilot/position-norm</property> | |||
<factor>5</factor> | |||
<axis> | |||
<x>0</x> | |||
<y>1</y> | |||
<z>0</z> | |||
</axis> | |||
</animation> | |||
[[Category:Aircraft enhancement|Animate models]] | [[Category:Aircraft enhancement|Animate models]] | ||
[[Category:Howto|Animate models]] | [[Category:Howto|Animate models]] | ||
[[Category:Scenery enhancement|Animate models]] | [[Category:Scenery enhancement|Animate models]] |