Horizontal:Wrap:Sinewave
ASTER::ACTION::ObjectControl::MOTION::Set Horizontal:Wrap:Sinewave
Select the Motion Template
Horizontal Wrap :: Sinewave
and register the object instance to the motion controller.
- Wrap is an action that continues moving by warping to a specified coordinate when exceeding the specified area.
Motion: Overview
In the case of horizontal movement (Horizontal
), virtual walls (The Virtual Walls
) can be set at each coordinate on the left and right ends. When hitting the wall, the coordinate warps to the wall on the opposite side in the direction of movement, and then moves towards the wall on the moving side again, repeating this routine.
When a collision (actually passing through coordinates) with a virtual wall is detected, an immediate execution condition is triggered, and the x
|y
coordinates or fixed values
of the corresponding instance can be obtained from the dedicated conditions and expressions.
The amount of movement can be set as a floating point number. In the ASTER beta version, the minimum unit of movement was
1
frame time =1
pixel, but the official version of ASTER achieves a finer resolution of movement.
Parameter.1
Parameter.2
Parameter.3
8
parameters are serialized and sent as one string.
" +1.5 , 300, +1.0, 0, 72, false , -40 , 1000 "
No. | Value | Abbreviation | Data Type | Description |
---|---|---|---|---|
1 | +1.5 | x vel | float | X movement |
2 | 300 | amp | int | Amplitude width (pixels) |
3 | +1.0 | ω | float | Angular velocity |
4 | 0 | setup ∠ | int | Initial setup angle |
5 | 72 | step ∠ | int | Step angle |
6 | false | bool | boolean | Start in stopped state (true,false) |
7 | -40 | wall-A | int | Virtual wall (left end) coordinate |
8 | 1000 | wall-B | int | Virtual wall (right end) coordinate |
-
The amplitude is measured in pixels, so it must be an integer. (Subpixels are not supported)
-
Angular Velocity (omega = ω) is a floating-point number.
-
Setup Angle is the angle specified at the start of movement. It is used in combination with the Step Angle described later.
-
Step Angle is a parameter that changes the initial setup angle according to the number of object instances.
The initial setup angle is determined by adding the value of the Step Angle multiplied by the action loop index to the Setup Angle value.
SetupAngle = SetupAngle + (StepAngle * ActionLoopIndexNumber)
If there are 6 instances, and the initial setup angle is 0, and the step angle is 72, the calculation example is as follows:
SetupAngle.1 :: 0 = 0 + ( 72 * 0 );
SetupAngle.2 :: 72 = 0 + ( 72 * 1 );
SetupAngle.3 :: 144 = 0 + ( 72 * 2 );
SetupAngle.4 :: 216 = 0 + ( 72 * 3 );
SetupAngle.5 :: 288 = 0 + ( 72 * 4 );
SetupAngle.6 :: 360 = 0 + ( 72 * 5 ); // 360 is equivalent to 0
Additional Notes
As a dedicated command to change the amplitude width, GrowRadius for Sinewave can be used.
- Related: GrowRadius for Sinewave