Difference between revisions of "Component: Animator (Simulation)"
(XML import) |
(XML import) |
||
(2 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
− | |||
{| width="50%" | {| width="50%" | ||
Line 7: | Line 6: | ||
|- | |- | ||
| width="20%" style="color: gray;" | Version | | width="20%" style="color: gray;" | Version | ||
− | | 1. | + | | 1.1 (Release) |
|- | |- | ||
| width="20%" style="color: gray;" | Category | | width="20%" style="color: gray;" | Category | ||
Line 16: | Line 15: | ||
==[[File:Component Icon f2dfca22_b0b8_4694_8d30_1c25063578e3.png|Image]] Animator component== | ==[[File:Component Icon f2dfca22_b0b8_4694_8d30_1c25063578e3.png|Image]] 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. | |
− | gravity and friction. | + | 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. | ||
==Examples== | ==Examples== | ||
Line 72: | Line 72: | ||
:[[Variable Types|FLOAT]] ''Acceleration'' | :[[Variable Types|FLOAT]] ''Acceleration'' | ||
− | ::Time in milliseconds to accelerate to the new speed. | + | ::Time in milliseconds to accelerate to the new speed.settings. |
Line 149: | Line 149: | ||
This property is of type ''Fixed list of ints'' and can be referenced with the variable name ''boundX_mode''. | This property is of type ''Fixed list of ints'' and can be referenced with the variable name ''boundX_mode''. | ||
− | Set the behaviour when the object reaches | + | Set the behaviour when the object reaches minimum or maximum boundaries (set below unless "off") |
− | Off - no boundaries, the object can continue along this | + | Off - no boundaries, the object can continue along this axis indefinitely. |
Stop - motion stops when the boundary is reached. | Stop - motion stops when the boundary is reached. | ||
Line 157: | Line 157: | ||
Wrap - when 'min' is reached, the object re-appears at 'max', and vice versa. | Wrap - when 'min' is reached, the object re-appears at 'max', and vice versa. | ||
− | Bounce - | + | Bounce - the object reverses direction in this axis. |
<span style="font-weight: normal;"><u>Mode</u></span> | <span style="font-weight: normal;"><u>Mode</u></span> | ||
Line 163: | Line 163: | ||
This property is of type ''Fixed list of ints'' and can be referenced with the variable name ''boundY_mode''. | This property is of type ''Fixed list of ints'' and can be referenced with the variable name ''boundY_mode''. | ||
− | Set the behaviour when the object reaches | + | Set the behaviour when the object reaches minimum or maximum boundaries (set below unless "off") |
− | Off - no boundaries, the object can continue along this | + | Off - no boundaries, the object can continue along this axis indefinitely. |
Stop - motion stops when the boundary is reached. | Stop - motion stops when the boundary is reached. | ||
Line 171: | Line 171: | ||
Wrap - when 'min' is reached, the object re-appears at 'max', and vice versa. | Wrap - when 'min' is reached, the object re-appears at 'max', and vice versa. | ||
− | Bounce - | + | Bounce - the object reverses direction in this axis. |
<span style="font-weight: normal;"><u>Mode</u></span> | <span style="font-weight: normal;"><u>Mode</u></span> | ||
Line 177: | Line 177: | ||
This property is of type ''Fixed list of ints'' and can be referenced with the variable name ''boundZ_mode''. | This property is of type ''Fixed list of ints'' and can be referenced with the variable name ''boundZ_mode''. | ||
− | Set the behaviour when the object reaches | + | Set the behaviour when the object reaches minimum or maximum boundaries (set below unless "off") |
− | Off - no boundaries, the object can continue along this | + | Off - no boundaries, the object can continue along this axis indefinitely. |
Stop - motion stops when the boundary is reached. | Stop - motion stops when the boundary is reached. | ||
Line 185: | Line 185: | ||
Wrap - when 'min' is reached, the object re-appears at 'max', and vice versa. | Wrap - when 'min' is reached, the object re-appears at 'max', and vice versa. | ||
− | Bounce - | + | Bounce - the object reverses direction in this axis. |
Latest revision as of 12:51, 21 July 2016
Author | Matrix Ltd |
Version | 1.1 (Release) |
Category | Simulation |
Contents
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.
Examples
No additional examples
Downloadable macro reference
This component does not contain any downloadable macros
Simulation macro reference
Stop
Stops the motion of the object - it will retain its position unless simulation is stopped
with 'Return to Zero' selected.
Parameters
- This macro has no parameters
Return value
- This call does not return a value
SetSpeed
Set the linear and rotational velocity of the object. Motion continues without
any further intervention, subject to the friction, gravity and boundary settings.
Parameters
- 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.
Return value
- This call does not return a value
Property reference
Target
This property is of type Panel object and can be referenced with the variable name target_object.
The object that the animator is to move.
Axis
This property is of type Fixed list of ints and can be referenced with the variable name axis_object.
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)
This property is of type Unsigned integer and can be referenced with the variable name interval.
The amount of time between frames in milliseconds.
This does not change the speed of travel, only the regularity of screen updates.
On Stop
This property is of type Fixed list of ints and can be referenced with the variable name 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.
Gravity
This property is of type Floating point and can be referenced with the variable name 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
This property is of type Floating point and can be referenced with the variable name 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.
Mode
This property is of type Fixed list of ints and can be referenced with the variable name boundX_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.
Mode
This property is of type Fixed list of ints and can be referenced with the variable name boundY_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.
Mode
This property is of type Fixed list of ints and can be referenced with the variable name boundZ_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.