Simple functions such as:
- Code: Select all
ANIMATE("X", 0, 100, 300)
will cause the DC to move between X=0, X=100, X=300 and back to X=0 on each click of the mouse.
- Code: Select all
ANIMATE("X", 0, 100, 300),flyback
will skip the move from X=300 to X=0 and jump right back.
- Code: Select all
ANIMATE("X", 0, 100, 300),flyback,forever
will cause the animation to continue unaided and not require additional mouse clicks to move to the next position.
- Code: Select all
ANIMATE("X", 0, 100, 200),flyback,forever,pause
will cause the animation to continue forever but pause briefly at each position.
- Code: Select all
ANIMATE("X", 0, 100, 200),flyback,forever,pause,time=3.2
will cause the animation to take 3.2 seconds to complete
- Code: Select all
ANIMATE("X", 0, 100, 200),flyback,forever,pause,time=3.2,delay=0.5
will cause the animation to wait for 0.5 seconds before starting
When an animation is activated by a mouse click, all DCs with the same name will be activated allowing complex animations to be started at the same time (and possibly staggered using the 'delay=' option)
LU supports "X", "RotX", "Y", "RotY", "Z", "RotZ" in the normal manner and additionally supports moving/rotating with respect to the local axes of the Component rather than the Model XYZ axes. This is accomplished by using lowercase letters for the axis name.
- Code: Select all
ANIMATE("roty", 0, 720),forever
will rotate around the Components Y axis regardless of where you place/orient it.
SU allows more complex movements to be build by adding more and more ANIMATE() functions. EG one for X position, another for Y., which can become cumbersome and is not supported by LU.
Instead, LU adds a new mode to ANIMATE called 'transformation':
- Code: Select all
ANIMATE("transformation", "name_of_a_path_group")
The "name_of_a_path_group" is a SU group/Component that consists of just a single set of connected lines/curves forming a path to follow. On activation of an object with this style of ANIMATE() function, the object will follow the 3D path from start to finish.
You can additionally add an extra parameter whether to orient your object along the direction of travel or not.
So:
- Code: Select all
animate("transformation", "a_path"),time=10.0,orient,flyback,forever
would animate your object along a path called "a_path" taking 10 seconds to complete and orienting the object along the direction of travel. At the end of the path the object will "flyback" instantly to the beginning. The animation, once started, will continue forever.
Because LU supports a number of extensions to the regular SU dynamic Component ANIMATE function, they only work in Tourtool mode. SU will just not understand this extra functionality. If you wish to keep the LU ANIMATE behavior completely separate from the SU ANIMATE behavior, you can use "onclick_lightup" as the behavior name in the DC rather than the standard "onclick".
Adam