Transformer¶
Moves one object or a whole group, with motions you can play from anywhere.
Add Component → Jungle → Spatial → Transformer. Pick a movement and it plays when the object is enabled. That is all you need for a simple move.
What You Get¶
| Field | What it does |
|---|---|
| Objects | What moves. Starts as the object you added the Transformer to. Point it at a list or a group, such as every asteroid, to move them all. |
| Motions | The movements it can play, each one folding open. The first one with Auto Start on plays when the Transformer starts, whatever its name. Turn Auto Start off on motions you only play on request. |
| Execution | When it starts and stops. By default, when the object is enabled and disabled. Stop Behavior decides whether stopping finishes each motion or leaves it where it is. |
Each object runs its own motion, so one asteroid can wobble on its own while the rest keep drifting.
Playing a Motion on Demand¶
- Add a second motion and give it a name, such as Hover.
- Wherever the motion should start (a Reactor reaction, a Process Component), add a Transformer Command pointing at the Transformer, with a Play Motion step naming Hover.
- Leave All Objects on to play it on every object, or turn it off to play it only on the objects you pick. By default that is the object the reaction is about, such as the asteroid you just grabbed.
Play Motion finishes when the motion has ended on every object it started on, so a sequence can wait for it. Stop Motion stops motions where they are.
A new motion on an object takes over from the one it was playing. The other objects are not affected.
Only motions of the same Transformer take over from each other. If something else also moves an object every frame, such as an orbit in a Process Component, the two fight and the object jumps between them. Make that movement a motion of the Transformer instead: the unnamed one if it runs all the time.
Sending Objects Home¶
The Transformer remembers where each object was, inside its parent, the first time it started moving it. You never set this yourself.
Add a motion named Home whose movement uses the Transformer Rest Pose destination. Play it, and the object goes back to where it started, even if its parent has moved since.
Outside a Transformer's own motion, set the destination's Transformer field to the Transformer that moves the object.
Reacting When a Motion Ends¶
- Transformer Moving is true while the Transformer moves its objects, or one object you pick. React to it turning false to act when a motion is done.
- Transformer Progress goes from 0 to 1 as a motion plays.
Older Scenes¶
Transformers saved before this version were converted to Process Components when the project opened. They keep working as they are.