Component: Motion Helper (Misc)

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


Motion Helper component

Helper for building components which require simulation of constant motion. Linked objects can be issued speed and acceleration parameters, and will then be animated automatically until another command is issued. The helper can control motion for up to four objects simultaneously, all with their own discrete motion settings.

Component Source Code

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

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

Detailed description

No detailed description exists yet for this component

Examples

Example showing how to use the motion helper component to easily assign motion to items on the panel. FC6 Icon.png Motion






Macro reference

RegisterTarget

Fc9-comp-macro.png RegisterTarget
Add a new object to the list of objects which the motion helper is animating. Up to four objects can be animated by each Motion Helper.  
Fc9-h32-icon.png - HANDLE Target
Handle of the target to link to. 
Fc9-h32-icon.png - HANDLE AxisObject
Axis object for this definition 
Fc9-u8-icon.png - BYTE Axis
Axis to move along/around (0=X, 1=Y, 2=Z) 
Fc9-u8-icon.png - BYTE Type
Motion type (0=Rotary, 1=Linear) 
Fc9-void-icon.png - VOID Return


SetAcceleration

Fc9-comp-macro.png SetAcceleration
Sets the acceleration for the target object. This sets how quickly the object reaches its new speed following a call to SetSpeed. NB) The object must be one of those registered using RegisterTarget. 
Fc9-h32-icon.png - HANDLE Target
Handle of the object to set the acceleration for. 
Fc9-f32-icon.png - FLOAT Acceleration
Time in milliseconds to reach a new speed. 
Fc9-void-icon.png - VOID Return


SetSpeed

Fc9-comp-macro.png SetSpeed
Set a new target speed for this object. Will use the acceleration parameter to set how long it will take to reach the new speed. NB) The object must be one of those previously declared using RegisterTarget 
Fc9-h32-icon.png - HANDLE Target
Target object to set the speed for. 
Fc9-f32-icon.png - FLOAT Speed
Target speed. World units per second or degrees per second. 
Fc9-void-icon.png - VOID Return


UnregisterAll

Fc9-comp-macro.png UnregisterAll
Totally clear the list of registered objects 
Fc9-void-icon.png - VOID Return


UnregisterTarget

Fc9-comp-macro.png UnregisterTarget
Remove a target from the list of links. 
Fc9-h32-icon.png - HANDLE Target
Handle of the object to remove 
Fc9-void-icon.png - VOID Return


Property reference

Fc9-prop-icon.png Properties
Fc9-type-21-icon.png Frame Interval
Time interval between animation frames. Does not affect the speed of motion, only the rate of screen updates. 
Fc9-type-16-icon.png On Stop
Decide what action to take when simulation stops. No Action - Animation is paused, continues from this position when simulation restarts Return to start - all object returned to their start positions, current speed resumes on simulation start. Clear speeds - objects retain their position, but speed is set to zero. Return and clear - objects return to start position and have theri speed set to zero.