Jump to content

Component: Animator (Misc): Difference between revisions

From Flowcode Help
No edit summary
m Text replacement - "style="background-color:#EAE1EA;"" to "class="mtx-class-propfolder""
 
(12 intermediate revisions by 2 users not shown)
Line 16: Line 16:


==Component Source Code==
==Component Source Code==
Please click here to download the component source project: [https://www.flowcode.co.uk/wiki/componentsource/FC_Comp_Source_animator.fcfx FC_Comp_Source_animator.fcfx]


Please click here to view the component source code (Beta): [https://www.flowcode.co.uk/FlowchartView/?wfile=componentsource/FC_Comp_Source_animator.fcfx FC_Comp_Source_animator.fcfx]
Please click here to view the component source code (Beta): [https://www.flowcode.co.uk/FlowchartView/?wfile=componentsource/FC_Comp_Source_animator.fcfx FC_Comp_Source_animator.fcfx]


==Detailed description==
==Detailed description==




Line 40: Line 48:


==Examples==
==Examples==




Line 62: Line 76:
[[File:Animator.jpg]]
[[File:Animator.jpg]]


==Macro reference==


{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Stop'''
|-
| colspan="2" | Stops the motion of the object - it will retain its position unless simulation is stopped with 'Return to Zero' selected. 
|-
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| width="90%" style="border-top: 2px solid #000;" | ''Return''
|}




{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
 
 
 
 
 
 
==Macro reference==
 
===SetSpeed===
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetSpeed'''
| width="90%" class="mtx-class-macrohead" | '''SetSpeed'''
|-
|-
| colspan="2" | Set the linear and rotational velocity of the object.  Motion continues without any further intervention, subject to the friction, gravity and boundary settings. 
| colspan="2" | Set the linear and rotational velocity of the object.  Motion continues without any further intervention, subject to the friction, gravity and boundary settings. 
Line 125: Line 137:




 
===Stop===
 
{| class="mtx-class-macrotable wikitable"
==Property reference==
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
|-
| width="10%" align="center" style="background-color:#D8C9D8;" | [[File:Fc9-prop-icon.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Properties'''
|-
|-
| width="10%" align="center" | [[File:Fc9-type-17-icon.png]]
| width="90%" | Target
|-
| colspan="2" | The object that the animator is to move. 
|-
| width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
| width="90%" | Axis
|-
| colspan="2" | 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. 
|-
| width="10%" align="center" | [[File:Fc9-type-21-icon.png]]
| width="90%" | Interval (ms)
|-
| colspan="2" | The amount of time between frames in milliseconds. This does not change the speed of travel, only the regularity of screen updates. 
|-
| width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
| width="90%" | On Stop
|-
| colspan="2" | 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. 
|-
| width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]]
| width="90%" style="background-color:#EAE1EA; color:#4B008D;" | Physics
|-
|-
| width="10%" align="center" | [[File:Fc9-type-15-icon.png]]
| width="90%" | Gravity
|-
| colspan="2" | 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. 
|-
|-
| width="10%" align="center" | [[File:Fc9-type-15-icon.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" | Friction
| width="90%" class="mtx-class-macrohead" | '''Stop'''
|-
| colspan="2" | 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. 
|-
| width="10%" align="center" | [[File:Fc9-type-7-icon.png]]
| width="90%" | Collisions
|-
| colspan="2" |  
|-
| width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]]
| width="90%" style="background-color:#EAE1EA; color:#4B008D;" | Bound X
|-
|-
| width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
| width="90%" | Mode
|-
| colspan="2" | 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. 
|-
| width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]]
| width="90%" style="background-color:#EAE1EA; color:#4B008D;" | Bound Y
|-
|-
| width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
| width="90%" | Mode
|-
| colspan="2" | 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. 
|-
| width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]]
| width="90%" style="background-color:#EAE1EA; color:#4B008D;" | Bound Z
|-
|-
| width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
| width="90%" | Mode
|-
| colspan="2" | 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. 
|}==Macro reference==
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Stop'''
|-
|-
| colspan="2" | Stops the motion of the object - it will retain its position unless simulation is stopped with 'Return to Zero' selected. 
| colspan="2" | Stops the motion of the object - it will retain its position unless simulation is stopped with 'Return to Zero' selected. 
Line 213: Line 149:
| width="90%" style="border-top: 2px solid #000;" | ''Return''
| width="90%" style="border-top: 2px solid #000;" | ''Return''
|}
|}
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetSpeed'''
|-
| colspan="2" | Set the linear and rotational velocity of the object.  Motion continues without any further intervention, subject to the friction, gravity and boundary settings. 
|-
|-
| width="10%" align="center" | [[File:Fc9-f32-icon.png]] - FLOAT
| width="90%" | AlongX
|-
| colspan="2" | Speed along the X-axis.  World units per second. 
|-
| width="10%" align="center" | [[File:Fc9-f32-icon.png]] - FLOAT
| width="90%" | AlongY
|-
| colspan="2" | Speed along the Y-axis.  World units per second. 
|-
| width="10%" align="center" | [[File:Fc9-f32-icon.png]] - FLOAT
| width="90%" | AlongZ
|-
| colspan="2" | Speed along the Z-axis.  World units per second. 
|-
| width="10%" align="center" | [[File:Fc9-f32-icon.png]] - FLOAT
| width="90%" | AroundX
|-
| colspan="2" | Rotational speed around the X-axis.  Degrees per second. 
|-
| width="10%" align="center" | [[File:Fc9-f32-icon.png]] - FLOAT
| width="90%" | AroundY
|-
| colspan="2" | Rotational speed around the Y-axis.  Degrees per second. 
|-
| width="10%" align="center" | [[File:Fc9-f32-icon.png]] - FLOAT
| width="90%" | AroundZ
|-
| colspan="2" | Rotational speed around the Z-axis.  Degrees per second. 
|-
| width="10%" align="center" | [[File:Fc9-f32-icon.png]] - FLOAT
| width="90%" | Acceleration
|-
| colspan="2" | Time in milliseconds to accelerate to the new speed.settings. 
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| width="90%" style="border-top: 2px solid #000;" | ''Return''
|}




==Property reference==
==Property reference==


{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" | [[File:Fc9-prop-icon.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-prop-icon.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Properties'''  
| width="90%" class="mtx-class-macrohead" | '''Properties'''  
|-
|-
|-
|-
Line 293: Line 179:
| colspan="2" | 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. 
| colspan="2" | 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. 
|-
|-
| width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]]
| width="10%" align="center" class="mtx-class-propfolder" | [[File:Fc9-conn-icon.png]]
| width="90%" style="background-color:#EAE1EA; color:#4B008D;" | Physics
| width="90%" class="mtx-class-propfolder" | Physics
|-
|-
|-
|-
Line 312: Line 198:
| colspan="2" |  
| colspan="2" |  
|-
|-
| width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]]
| width="10%" align="center" class="mtx-class-propfolder" | [[File:Fc9-conn-icon.png]]
| width="90%" style="background-color:#EAE1EA; color:#4B008D;" | Bound X
| width="90%" class="mtx-class-propfolder" | Bound X
|-
|-
|-
|-
Line 321: Line 207:
| colspan="2" | 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. 
| colspan="2" | 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. 
|-
|-
| width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]]
| width="10%" align="center" class="mtx-class-propfolder" | [[File:Fc9-conn-icon.png]]
| width="90%" style="background-color:#EAE1EA; color:#4B008D;" | Bound Y
| width="90%" class="mtx-class-propfolder" | Bound Y
|-
|-
|-
|-
Line 330: Line 216:
| colspan="2" | 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. 
| colspan="2" | 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. 
|-
|-
| width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]]
| width="10%" align="center" class="mtx-class-propfolder" | [[File:Fc9-conn-icon.png]]
| width="90%" style="background-color:#EAE1EA; color:#4B008D;" | Bound Z
| width="90%" class="mtx-class-propfolder" | Bound Z
|-
|-
|-
|-

Latest revision as of 14:36, 13 July 2026

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. Animation






Macro reference

SetSpeed

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


Stop

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


Property reference

Properties
Target
The object that the animator is to move. 
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. 
Interval (ms)
The amount of time between frames in milliseconds. This does not change the speed of travel, only the regularity of screen updates. 
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. 
Physics
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. 
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. 
Collisions
 
Bound X
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. 
Bound Y
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. 
Bound Z
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.