33
edits
mNo edit summary |
(→Examples: added a true basic example with explanations) |
||
Line 39: | Line 39: | ||
== Examples == | == Examples == | ||
Basic usage: | Basic usage: | ||
Cycles the property between 0..3 and rotates the knob object in steps of 60° (property value x factor). | |||
The knobs 3D model must be positioned at the '0' position in order to move in sync. | |||
<syntaxhighlight lang="xml"> | |||
<?xml version="1.0" encoding="utf8"?> | |||
<PropertyList> | |||
<animation> | |||
<name>Wiper Left</name> | |||
<type>knob</type> | |||
<object-name>wiper.left</object-name> | |||
<property>controls/switches/wiper-left</property> | |||
<factor>60</factor> | |||
<axis> | |||
<object-name>wiper.left.axis</object-name> | |||
</axis> | |||
<action> | |||
<binding> | |||
<command>property-cycle</command> | |||
<property>controls/switches/wiper-left</property> | |||
<value>0</value> | |||
<value>1</value> | |||
<value>2</value> | |||
<value>3</value> | |||
<wrap>false</wrap> | |||
</binding> | |||
<binding> | |||
<command>property-toggle</command> | |||
<property>sim/sound/knob1</property> | |||
</binding> | |||
</action> | |||
</animation> | |||
</PropertyList> | |||
</syntaxhighlight> | |||
Another basic example: | |||
<syntaxhighlight lang="xml"> | <syntaxhighlight lang="xml"> | ||
<?xml version="1.0" encoding="utf8"?> | <?xml version="1.0" encoding="utf8"?> | ||
Line 217: | Line 254: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
Note: For the release you can simply use another property-assign with a value of 0. | Note: For the release you can simply use another property-assign with a value of 0. | ||
== Related content == | == Related content == | ||
* [[Howto:Animate models]] | * [[Howto:Animate models]] |
edits