Howto:Animate models: Difference between revisions

Jump to navigation Jump to search
(Texture animations)
Line 196: Line 196:


Note the omission of the leading slash '/' when reffering to the property. This assures that when the model is used for AI or multiplayer traffic the animations will follow that of the AI controller instead of that of the user.
Note the omission of the leading slash '/' when reffering to the property. This assures that when the model is used for AI or multiplayer traffic the animations will follow that of the AI controller instead of that of the user.
=== Expressions ===
For some animations it is possible to define complex animations by using [[Expressions|Expressions]]. This even allows to drive the animation from multiple properties without the need for additional Nasal scripts. Here is an example for a translate animation depending on two properties and the cosine function:
<syntaxhighlight lang="xml">
<animation>
    <type>translate</type>
    <expression>
      <product>
        <property>/my/factor-property</property>
        <cos>
          <deg2rad>
            <property>/my/angular-property</property>
          </deg2rad>
        </cos>
      </product>
    </expression>
    [..]more elements[..]
</animation>
</syntaxhighlight>
Animations which can utilize [[Expressions|Expressions]] are:
* [[Howto:Animate_models#Translate|Translate]]
* [[Howto:Animate_models#Rotate|Rotate]]
* [[Howto:Animate_models#Scale|Scale]]
* [[Howto:Animate_models#Range|Range]]
* [[Howto:Animate_models#Blend|Blend]]
See more detailed info at [[Expressions|Expressions]]


== Animation types ==
== Animation types ==
546

edits

Navigation menu