Difference between revisions of "Component: Motion Helper (Misc)"
Line 17: | Line 17: | ||
==Component Source Code== | ==Component Source Code== | ||
− | Please click here to download the component source project: [https://www.flowcode.co.uk/ | + | Please click here to download the component source project: [https://www.flowcode.co.uk/wiki/componentsource/FC_Comp_Source_Motion_Helper.fcfx FC_Comp_Source_Motion_Helper.fcfx] |
Please click here to view the component source code (Beta): [https://www.flowcode.co.uk/FlowchartView/?wfile=componentsource/FC_Comp_Source_Motion_Helper.fcfx FC_Comp_Source_Motion_Helper.fcfx] | Please click here to view the component source code (Beta): [https://www.flowcode.co.uk/FlowchartView/?wfile=componentsource/FC_Comp_Source_Motion_Helper.fcfx FC_Comp_Source_Motion_Helper.fcfx] | ||
==Detailed description== | ==Detailed description== | ||
+ | |||
+ | |||
Line 44: | Line 46: | ||
==Examples== | ==Examples== | ||
+ | |||
+ | |||
Line 68: | Line 72: | ||
==Macro reference== | ==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;" | '''RegisterTarget''' | ||
+ | |- | ||
+ | | colspan="2" | 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. | ||
+ | |- | ||
+ | |- | ||
+ | | width="10%" align="center" | [[File:Fc9-h32-icon.png]] - HANDLE | ||
+ | | width="90%" | Target | ||
+ | |- | ||
+ | | colspan="2" | Handle of the target to link to. | ||
+ | |- | ||
+ | | width="10%" align="center" | [[File:Fc9-h32-icon.png]] - HANDLE | ||
+ | | width="90%" | AxisObject | ||
+ | |- | ||
+ | | colspan="2" | Axis object for this definition | ||
+ | |- | ||
+ | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE | ||
+ | | width="90%" | Axis | ||
+ | |- | ||
+ | | colspan="2" | Axis to move along/around (0=X, 1=Y, 2=Z) | ||
+ | |- | ||
+ | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE | ||
+ | | width="90%" | Type | ||
+ | |- | ||
+ | | colspan="2" | Motion type (0=Rotary, 1=Linear) | ||
+ | |- | ||
+ | | 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;" | ||
+ | |- | ||
+ | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | ||
+ | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetAcceleration''' | ||
+ | |- | ||
+ | | colspan="2" | 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. | ||
+ | |- | ||
+ | |- | ||
+ | | width="10%" align="center" | [[File:Fc9-h32-icon.png]] - HANDLE | ||
+ | | width="90%" | Target | ||
+ | |- | ||
+ | | colspan="2" | Handle of the object to set the acceleration for. | ||
+ | |- | ||
+ | | width="10%" align="center" | [[File:Fc9-f32-icon.png]] - FLOAT | ||
+ | | width="90%" | Acceleration | ||
+ | |- | ||
+ | | colspan="2" | Time in milliseconds to reach a new speed. | ||
+ | |- | ||
+ | | 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;" | ||
+ | |- | ||
+ | | 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 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 | ||
+ | |- | ||
+ | |- | ||
+ | | width="10%" align="center" | [[File:Fc9-h32-icon.png]] - HANDLE | ||
+ | | width="90%" | Target | ||
+ | |- | ||
+ | | colspan="2" | Target object to set the speed for. | ||
+ | |- | ||
+ | | width="10%" align="center" | [[File:Fc9-f32-icon.png]] - FLOAT | ||
+ | | width="90%" | Speed | ||
+ | |- | ||
+ | | colspan="2" | Target speed. World units per second or degrees per second. | ||
+ | |- | ||
+ | | 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;" | ||
+ | |- | ||
+ | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | ||
+ | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''UnregisterTarget''' | ||
+ | |- | ||
+ | | colspan="2" | Remove a target from the list of links. | ||
+ | |- | ||
+ | |- | ||
+ | | width="10%" align="center" | [[File:Fc9-h32-icon.png]] - HANDLE | ||
+ | | width="90%" | Target | ||
+ | |- | ||
+ | | colspan="2" | Handle of the object to remove | ||
+ | |- | ||
+ | | 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;" | ||
+ | |- | ||
+ | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | ||
+ | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''UnregisterAll''' | ||
+ | |- | ||
+ | | colspan="2" | Totally clear the list of registered objects | ||
+ | |- | ||
+ | |- | ||
+ | | 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== | ||
+ | |||
+ | {| 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-21-icon.png]] | ||
+ | | width="90%" | Frame Interval | ||
+ | |- | ||
+ | | colspan="2" | Time interval between animation frames. Does not affect the speed of motion, only the rate of screen updates. | ||
+ | |- | ||
+ | | width="10%" align="center" | [[File:Fc9-type-16-icon.png]] | ||
+ | | width="90%" | On Stop | ||
+ | |- | ||
+ | | colspan="2" | 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. | ||
+ | |}==Macro reference== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" |
Revision as of 09:59, 27 January 2023
Author | Matrix Ltd |
Version | 1.1 |
Category | Misc |
Contents
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.
Motion
Macro reference
![]() |
UnregisterTarget |
Remove a target from the list of links. | |
![]() |
Target |
Handle of the object to remove | |
![]() |
Return |
![]() |
UnregisterAll |
Totally clear the list of registered objects | |
![]() |
Return |
Property reference
==Macro reference==
![]() |
UnregisterTarget |
Remove a target from the list of links. | |
![]() |
Target |
Handle of the object to remove | |
![]() |
Return |
![]() |
UnregisterAll |
Totally clear the list of registered objects | |
![]() |
Return |
Property reference
==Macro reference==
![]() |
UnregisterTarget |
Remove a target from the list of links. | |
![]() |
Target |
Handle of the object to remove | |
![]() |
Return |
![]() |
UnregisterAll |
Totally clear the list of registered objects | |
![]() |
Return |
Property reference
==Macro reference==
![]() |
UnregisterTarget |
Remove a target from the list of links. | |
![]() |
Target |
Handle of the object to remove | |
![]() |
Return |
![]() |
UnregisterAll |
Totally clear the list of registered objects | |
![]() |
Return |