Howto:Animate models
Jump to navigation
Jump to search
Work in progress This article or section will be worked on in the upcoming hours or days. See history for the latest developments. |
Pick
See Howto: Make a clickable panel#Pick for the main article about this subject. |
Range
To prevent objects -like instruments- being drawn when the aircraft is actually too far away for them to be seen anyway, a range animation is used.
<animation> <type>range</type> <min-m>0</min-m> <max-m>30</max-m> </animation>
- min-m: the shortest distance (in meters) from the object center at which it is visible.
- max-m: the largest distance (in meters) from the object center at which it is visible.
You could also use the generic level of detail (LOD) properties, which can be set by the user through View > Adjust LOD rangers:
- /sim/rendering/static-lod/bare distance at which only a rough exterior model is required.
- /sim/rendering/static-lod/rough distance at which most should be visible.
- /sim/rendering/static-lod/detailed distance at which all details should be visible.
The animation code will look like this:
<animation> <type>range</type> <min-m>0</min-m> <max-property>sim/rendering/static-lod/bare</max-property> </animation>
You can have both ranges (max and min) bound to a property, or just one of them.
- min-property:
- max-property:
Rotate
Select
This animation selects (or unselects) objects when certain conditions are true (or false). The example below shows the object when the n1 of engine[1] is higher than 25%.
<animation> <object-name>Object</object-name> <type>select</type> <condition> <greater-than> <property>engines/engine[1]/n1</property> <value>25</value> </greater-than> </condition> </animation>