MoveTowards: Swap.EPs
ASTER::ACTION::MotionControl::MoveTowards: Pair & Swap XY Positions (Group A-B)
“Group A” and “Group B” are selected, paired based on selection order, and their instances’ positions are swapped within the given time.
“MoveTowards: SwapEPs” selects instances separately as mvt.Target
and mvt.Pursuer
, pairs them one-to-one based on selection order, and swaps their positions within the specified time.
A similar function, MoveTowards: SwapTgt, simplifies the selection process and the number of selections.
Function | Pairing Target | Operation |
---|---|---|
SwapTgt | Same group (mvt.Target ) |
Create pairs based on selection order and swap positions |
SwapEPs | Different groups (mvt.Target and mvt.Pursuer ) |
Create pairs based on selection order and swap positions |
Once the movement is completed, the motion group is automatically deregistered. Even after the motion group is deregistered, the selection information of instances chosen as mvt.Tgt or mvt.Prs remains.
Before Use
The action of pairing instances and swapping their positions within a given time is defined as
MoveTowards: Swap
.
mvt.Target
and mvt.Pursuer
selection can be managed using the following utility (MvtUtil) designed for MoveTowards.
-
ASTER :: Action :: MotionControl :: MvtUtil: Define max selectable instances for mvt.Tgt & mvt.Prs
-
ASTER :: Action :: MotionControl :: MvtUtil: Toggle selection state for mvt.Target
-
ASTER :: Action :: MotionControl :: MvtUtil: Toggle selection state for mvt.Pursuer
-
ASTER :: Action :: MotionControl :: MvtUtil: Reset All Selections ( mvt.Tgt & mvt.Prs )
-
ASTER :: Action :: MotionControl :: MvtUtil: Reset Selections ( mvt.Pursuer )
-
ASTER :: Expression :: MotionControl :: MvtUtil: Get total selections of mvt.Target
-
ASTER :: Expression :: MotionControl :: MvtUtil: Get total selections of mvt.Pursuer
Instance data selected as
mvt.Target
can be exported to JSON.
-
ASTER :: Action :: JSON :: MvtUtil: Export fixed values of mvt.Target as a JSON array
-
ASTER :: Action :: JSON :: MvtUtil: Export fixed values of mvt.Pursuer as a JSON array
-
ASTER :: Action :: JSON :: MvtUtil: Export xy coordinates of mvt.Target as a JSON 2D array
-
ASTER :: Action :: JSON :: MvtUtil: Export xy coordinates of mvt.Pursuer as a JSON 2D array
Experimental feature: Cache instances to be linked.
-
ASTER :: Action :: MotionControl :: MvtUtil: Cache a related instance
-
ASTER :: Action :: MotionControl :: MvtUtil: Destroy a related instance
Parameter.1
Enter the motion group name to register to the motion controller.
Even instances created from different objects can be grouped with the same motion group name and managed by the controller.
Instances already registered to the controller cannot be duplicately registered under a different group name.
Multibyte strings (such as Japanese) can also be used, but for practical purposes, short names in lowercase letters are recommended.
"test"
When using the name set to the active object as the motion group name for registration, send an empty string.
""
Parameter.2
8 parameters are serialized and transmitted.
" 60, false, 0, 30, -1, false, 30, false "
argument | Name | type | descriptions |
---|---|---|---|
60 | timebound | unsigned int | Time until completion of operation, Frame Time |
false | EvD: Motion Start | Boolean | Event Detection Flag (rev.1.0.5) |
0 | motion-type | unsigned int | Only 0 is implemented (rev.1.0.x) |
30 | Sleep Time | unsigned int | Time to pause via sleep, Frame Time |
-1 | Sleep Repetition | int | Number of sleep repetitions; -1 is infinite, 0 disables |
false | Sleep Begin Flag | boolean | Flag to enable sleep at the start of operation |
30 | Sleep Interval Value | unsigned int | Time until next sleep, Frame Time |
false | EvD: Motion Close | Boolean | Event Detection Flag (rev.1.0.5) |
Time Bound
unsigned int
Time required to complete movement, application frame time. In an application running at 60 FPS, 60
corresponds to approximately one second.
A value to determine movement per unit time based on distance. Movement speed increases or decreases depending on the given conditions.
The specification calculates movement based on the measured distance to the target coordinate and the set time limit, so negative values cannot be assigned to the time limit.
Assigning 0
will cancel the movement.
EvD Flag: about to start moving
boolean
Event Detection Flag: if true
, the condition runs once immediately before an instance starts moving.
Motion Type
unsigned int
Assign 0
. Select uniform linear motion.
MoveTowards sub-motion type setting. ASTER rev.1.0.x does not support values other than 0. Future updates will add support.
Sleep Time
unsigned int
Sets the duration of movement suspension, application frame time. In an application running at 60 FPS, 60
corresponds to approximately one second.
Negative values cannot be assigned.
Sleep Repetition
int
Sets the number of times sleep resumes after it finishes. If sleep is not needed, assign 0
.
-1
results in an infinite loop.
Sleep Begin Flag
boolean
Flag to determine whether movement starts with sleep enabled when MoveTowards is executed.
If true
, sleep occurs first, then movement begins after sleep finishes.
If false
, movement starts immediately and pauses when the time comes.
Sleep Interval
unsigned int
Sets the duration before the next sleep pause after sleep has ended. Application frame time.
Negative values cannot be assigned.
EvD Flag: Right after reaching the target coordinates
boolean
Event detection flag: if true
, an immediate execution condition that runs once right after the instance reaches the target coordinates.
Note
mvt.Target
and mvt.Pursuer
are recorded in ASTER based on their selection order, and pairs are formed accordingly.
When forming instance pairs, if there are unpaired instances left, the SwapEPs specification skips processing those instances.
The SwapTgt specification always requires selecting two instances, ensuring that no unpaired instances remain.