Component: Animator (Misc)

From Flowcode Help
Jump to navigationJump to search
Author Matrix Ltd
Version 2.0
Category Misc


Animator component

Basic animation and physics simulation for a single object. The target object can be set in motion by a simulation macro call, and will then continue in motion under the control of the animator. Boundaries can be set beyond which the object cannot move, and the behaviour of the object defined when it meets them. Simple simulation of gravity and friction are also possible.

Component Source Code

Please click here to download the component source project: FC_Comp_Source_animator.fcfx

Please click here to view the component source code (Beta): FC_Comp_Source_animator.fcfx

Detailed description

No detailed description exists yet for this component

Examples

Simple example showing how to use the animator component to simulate the movement of several panel items. FC6 Icon.png Animation Animator.jpg






Macro reference

SetSpeed

Fc9-comp-macro.png SetSpeed
Set the linear and rotational velocity of the object. Motion continues without any further intervention, subject to the friction, gravity and boundary settings. 
Fc9-f32-icon.png - FLOAT AlongX
Speed along the X-axis. World units per second. 
Fc9-f32-icon.png - FLOAT AlongY
Speed along the Y-axis. World units per second. 
Fc9-f32-icon.png - FLOAT AlongZ
Speed along the Z-axis. World units per second. 
Fc9-f32-icon.png - FLOAT AroundX
Rotational speed around the X-axis. Degrees per second. 
Fc9-f32-icon.png - FLOAT AroundY
Rotational speed around the Y-axis. Degrees per second. 
Fc9-f32-icon.png - FLOAT AroundZ
Rotational speed around the Z-axis. Degrees per second. 
Fc9-f32-icon.png - FLOAT Acceleration
Time in milliseconds to accelerate to the new speed.settings. 
Fc9-void-icon.png - VOID Return


Stop

Fc9-comp-macro.png Stop
Stops the motion of the object - it will retain its position unless simulation is stopped with 'Return to Zero' selected. 
Fc9-void-icon.png - VOID Return


Property reference

Fc9-prop-icon.png Properties
Fc9-type-17-icon.png Target
The object that the animator is to move. 
Fc9-type-16-icon.png Axis
Reference frame for the axes of motion. Object - use the target's own axes e.g. a vehicle,which always moves in the direction it is pointing. World - use the world axes of the system panel - e.g. when using the 'gravity' setting. 
Fc9-type-21-icon.png Interval (ms)
The amount of time between frames in milliseconds. This does not change the speed of travel, only the regularity of screen updates. 
Fc9-type-16-icon.png On Stop
What to do when simulation stops. Freeze - the motion is paused. Position and speed are retained, simulation resumes with these settings. Return to Zero - the object returns to the start position, but its speed is remembered. Zero speed - the object keeps its final position, but the speed is set to zero. Return and Zero - the object retuirns to the start position, and speed is set to zero. 
Fc9-conn-icon.png Physics
Fc9-type-15-icon.png Gravity
Simple simulation of accelleration due to gravity. Always acts along the negative X world axis ("down"). Range... 0.0 - no gravity. > 0 - a pul along the downward Z-axis. 
Fc9-type-15-icon.png Friction
Simple friction simulation. Once a steady state is reached after any SetSpeed macro, the velocities will exponentially decay away. 0.0...No friction, movements continue until stopped by macro or simulation end. 1.0...Infinite friction - object will stop dead as soon as SetSpeed acceleration is complete. 
Fc9-type-7-icon.png Collisions
 
Fc9-conn-icon.png Bound X
Fc9-type-16-icon.png Mode
Set the behaviour when the object reaches minimum or maximum boundaries (set below unless "off") Off - no boundaries, the object can continue along this axis indefinitely. Stop - motion stops when the boundary is reached. Wrap - when 'min' is reached, the object re-appears at 'max', and vice versa. Bounce - the object reverses direction in this axis. 
Fc9-conn-icon.png Bound Y
Fc9-type-16-icon.png Mode
Set the behaviour when the object reaches minimum or maximum boundaries (set below unless "off") Off - no boundaries, the object can continue along this axis indefinitely. Stop - motion stops when the boundary is reached. Wrap - when 'min' is reached, the object re-appears at 'max', and vice versa. Bounce - the object reverses direction in this axis. 
Fc9-conn-icon.png Bound Z
Fc9-type-16-icon.png Mode
Set the behaviour when the object reaches minimum or maximum boundaries (set below unless "off") Off - no boundaries, the object can continue along this axis indefinitely. Stop - motion stops when the boundary is reached. Wrap - when 'min' is reached, the object re-appears at 'max', and vice versa. Bounce - the object reverses direction in this axis.