MoveTowards: RefVec.Cyclic
ASTER::ACTION::MotionControl::MoveTowards:RefVec.Cyclic, The mvt.Target is a Reference Vector.
MoveTowards: RefVec.Cyclic is a motion template that utilizes XY coordinate data stored in a sequential container as movement targets.
The object instance selected as mvt.Pursuer refers to the XY coordinates stored in the Reference Vector and moves toward the target location.
- Relevant URL : MvtUtil :: Reference Vector
About MoveTowards:RefVec.Cyclic
MoveTowards:RefVec moves an object instance towards the target coordinates and stops once it reaches them. RefVec.Cyclic is an advanced version that periodically updates the target coordinates, ensuring continuous motion without interruptions, enabling smooth cyclic movement control using MoveTowards.
The target coordinates are stored in a Reference Vector, which utilizes std::deque, a C++ sequence container. Cyclic is one of the algorithms applied to sequential containers and processes data similarly to std::rotate.
MoveTowards:Re.:Cyclic demonstrations
Before Use:
Store the target coordinates in the Reference Vector beforehand
Relevant URL
-
ASTER :: Action :: MotionControl :: MvU: Create Reference Vector, Align Hexagonal L2RT2B Format
-
ASTER :: Action :: MotionControl :: MvU: Create Reference Vector, Current coords of obj instances
-
ASTER :: Action :: MotionControl :: MoveTowards: RefVec
-
ASTER :: Action :: MotionControl :: MoveTowards: TgtArr
-
ASTER :: Conditions :: MotionControl :: EvD: MvU: BEGIN moving moment
-
ASTER :: Conditions :: MotionControl :: EvD: MvU: CLOSE moving moment
-
ASTER :: Expressions::MotionControl :: EvD: MvU: Retrieve CF25 animation dir based on movement dirs
-
ASTER :: Action :: JSON :: MvtUtil: Creat a JSON array exported from the Reference Vector
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
10parameters are serialized and transmitted.
"30, false, 0, 40, -1, true, 90, false, +1, -1"| 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) |
| +1 | Rotate Behavior | int | c++ Algorithm, std::rotate |
| -1 | repetition | int | Not Yet Implemented :: ASTER 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: The moment after stops moving
boolean
Event Detection Flag: If true, the condition runs once immediately after an instance stops moving.
Rotate Behavior
int
C++
| Value | Behavior |
|---|---|
| -1 | Shift elements left (if applied with negative index logic) |
| 0 | No rotation (Undefined behavior if misused) |
| +1 | Shift elements right (if applied with positive index logic) |
The definition of value 0 is still undefined. ( ASTER rev.1.0.5 )
The C++
std::rotatefunction rearranges elements. It does not determine the rotation direction using numbers (-1, 0, +1); instead, it specifies the starting position with an iterator and rotates the elements within the given range.
ASTER rev.1.0.5 does not use the actual std::rotate, but the sorting principle is nearly the same. Only -1 and +1 have been tested so far, and there are still undecided specifications regarding the handling of 0 and other values.
Repetition Re.:Cyclic
int
Not yet implemented :: ASTER rev.1.0.5