I'm working on a plane and like to change the brightness of a part depending on the actual view.
In the .ac-file the material is set to diffuse 1.0 and ambient 0.5.
If a special view is selected it should appear darker. Tried it with several code, but it never worked.
The brightness always stayed on the dark value, even when the condition ins't true.
This is my last code:
- Code: Select all
<animation>
<type>material</type>
<object-name>Innenraum</object-name>
<condition>
<or>
<greater-than>
<property>sim[0]/current-view/view-number</property>
<value>13</value>
</greater-than>
<less-than>
<property>sim[0]/current-view/view-number</property>
<value>11</value>
</less-than>
</or>
</condition>
<diffuse>
<red> 0.28 </red>
<green> 0.28 </green>
<blue> 0.28 </blue>
</diffuse>
<ambient>
<red> 0.15 </red>
<green> 0.15 </green>
<blue> 0.15 </blue>
</ambient>
<specular>
<red> 0.03 </red>
<green> 0.03 </green>
<blue> 0.03 </blue>
</specular>
</animation>
What am I doing wrong?