8,802
edits
mNo edit summary |
(more animations) |
||
Line 15: | Line 15: | ||
* 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 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. | * 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. | ||
You could also define two points, between which FlightGear will calculate the correct axis. This makes the use of a [[#Center|<nowiki><center></nowiki>]] tag redundant! Such coordinates are extremely useful for animating control surfaces (rudder, elevators etc.). | |||
<axis> | |||
<x1-m> 4.9</x1-m> | |||
<y1-m> 7.1</y1-m> | |||
<z1-m>-1.0</z1-m> | |||
<x2-m> 5.9</x2-m> | |||
<y2-m>11.2</y2-m> | |||
<z2-m>-0.5</z2-m> | |||
</axis> | |||
===Center=== | ===Center=== | ||
Line 86: | Line 97: | ||
</axis> | </axis> | ||
</animation> | </animation> | ||
===Interpolation=== | |||
For non-fixed factors, an interpolation "table" can be created. | |||
<interpolation> | |||
<entry> | |||
<ind> 0.0</ind> | |||
<dep> 0.0</dep> | |||
</entry> | |||
<entry> | |||
<ind> 0.667</ind> | |||
<dep> 0.0</dep> | |||
</entry> | |||
<entry> | |||
<ind> 1.0</ind> | |||
<dep> 0.5</dep> | |||
</entry> | |||
</interpolation> | |||
The lines above represent the following table: | |||
{| | |||
!Input | |||
!Output | |||
|- | |||
|0.0 | |||
|0.0 | |||
|- | |||
|0.667 | |||
|0.0 | |||
|- | |||
|1.0 | |||
|0.5 | |||
|} | |||
You can add as many entries as you need. Interpolation tables are often used for gear animations (eg. to open doors during gear-movements and close them again once the gear is either retracted or fully extended). | |||
===Name=== | ===Name=== | ||
Line 141: | Line 188: | ||
</interpolation> | </interpolation> | ||
</animation> | </animation> | ||
===Flash=== | |||
<animation> | |||
<type>flash</type> | |||
<object-name>Object</object-name> | |||
<offset>0.0</offset> | |||
<factor>1.0</factor> | |||
<power>2</power> | |||
<two-sides type="bool">false</two-sides> | |||
<min>0.0</min> | |||
<max>1.0</max> | |||
<center> | |||
<x-m>0.0</x-m> | |||
<y-m>0.0</y-m> | |||
<z-m>0.0</z-m> | |||
</center> | |||
<axis> | |||
<x>0.0</x> | |||
<y>-1</y> | |||
<z>0.1</z> | |||
</axis> | |||
</animation> | |||
*'''offset:''' | |||
*'''factor:''' | |||
*'''power:''' | |||
*'''two-sides:''' | |||
*'''min:''' | |||
*'''max:''' | |||
===Material=== | ===Material=== | ||
Line 229: | Line 305: | ||
* '''factor:''' is optional. | * '''factor:''' is optional. | ||
===Scale=== | |||
A scale animation scales (resizes) an object. | |||
<animation> | |||
<type>scale</type> | |||
<object-name>Object</object-name> | |||
<property>sim/time/sun-angle-rad</property> | |||
<x-min>1.0</x-min> | |||
<y-min>1.0</y-min> | |||
<z-min>1.0</z-min> | |||
<x-factor>1.4</x-factor> | |||
<y-factor>1.4</y-factor> | |||
<z-factor>2.0</z-factor> | |||
</animation> | |||
* ?-min: the mimimum scale factor for each axis. If the property value would result in a smaller factor than this setting, the scale animation will hold. | |||
* ?-factor: the scale factor for each axis (factor*property=scale factor). | |||
===Select=== | ===Select=== |