[Behavior] moveto

Post your completed addons to share with the community

Post » Tue Jan 03, 2017 5:41 am

@Zebbi

rex_moveTo behavior moves object every tick with dt. Dt will be changed depended on frame rate. It does not necessary to make another feature to move in lower framerate. imo.

Set position at specific event is another issue, it is better to have another new behavior for "MovementLinkedToAnimation". But I don't have plan for this behavior.
B
108
S
26
G
272
Posts: 4,472
Reputation: 152,279

Post » Tue Jan 03, 2017 9:07 am

rexrainbow wrote:@Zebbi

rex_moveTo behavior moves object every tick with dt. Dt will be changed depended on frame rate. It does not necessary to make another feature to move in lower framerate. imo.

Set position at specific event is another issue, it is better to have another new behavior for "MovementLinkedToAnimation". But I don't have plan for this behavior.

Is there a way to do this with events, so the object is only visibly moving at intervals, to give the appearance of a lowered frame rate?
B
41
S
12
G
14
Posts: 1,120
Reputation: 11,259

Post » Tue Jan 03, 2017 8:19 pm

Sprite > On frame changed
....... move pixels

System > Every X seconds ..... time = random(1/12,1/60)
....... move pixels

System > Every X seconds ..... time = 1/15
....... move pixels

System > compare two values ... value 1 = tickcount%5 .. = .. value 2 = zero
....... move

If you wanna use a behaviour

System > compare two values ... value 1 = tickcount%3 .. = .. value 2 = zero
....... system > Set object timescale .. zero
Else
....... system > Set object timescale .. 1
B
33
S
18
G
28
Posts: 2,493
Reputation: 20,950

Post » Wed Jan 04, 2017 7:35 pm

99Instances2Go wrote:Sprite > On frame changed
....... move pixels

System > Every X seconds ..... time = random(1/12,1/60)
....... move pixels

System > Every X seconds ..... time = 1/15
....... move pixels

System > compare two values ... value 1 = tickcount%5 .. = .. value 2 = zero
....... move

If you wanna use a behaviour

System > compare two values ... value 1 = tickcount%3 .. = .. value 2 = zero
....... system > Set object timescale .. zero
Else
....... system > Set object timescale .. 1

Now, the behaviour with the timescaling, that won't keep the relative speed correct, will it? It'll just be pausing the character every other tick, but the character won't move further down it's route in between pauses, will it?
B
41
S
12
G
14
Posts: 1,120
Reputation: 11,259

Post » Wed Jan 04, 2017 7:42 pm

Of course not, it is the effect you want. A fake lower frame rate. No ?
B
33
S
18
G
28
Posts: 2,493
Reputation: 20,950

Post » Wed Jan 04, 2017 11:12 pm

99Instances2Go wrote:Of course not, it is the effect you want. A fake lower frame rate. No ?

Yeah, a fake lower frame rate, I just thought timescale paused the movement's time without it catching up after the pause?
B
41
S
12
G
14
Posts: 1,120
Reputation: 11,259

Post » Sun Feb 12, 2017 1:11 am

Hello, moveTo does not have the option to use with the angle.
I mean, move the angle of an object from point A to point B.
Would you consider adding the angle option?
B
29
S
12
G
21
Posts: 801
Reputation: 14,453

Post » Sun Feb 12, 2017 6:35 am

@The Mnk

Do you mean that spine object face to point B?
B
108
S
26
G
272
Posts: 4,472
Reputation: 152,279

Post » Sun Feb 12, 2017 8:11 am

I mean add this option:

Image

To rotate an object without changing its X and Y coordinates.
Excuse my English please

I want to move my object to an X and Y position but I also want my object change its angle at the same time in the duration of the movement, all sincronized.

So the movement of the angle ends when the movement to your target X and Y is also over.

Then I want to move two properties:
1 the X and Y
2 angle
B
29
S
12
G
21
Posts: 801
Reputation: 14,453

Post » Sun Feb 12, 2017 9:00 am

@The Mnk

i prefer to keep moveTo behavior simple, therefore it only set position of object every tick.
Here is another behavior to spine object face to another position. You could combine them.
B
108
S
26
G
272
Posts: 4,472
Reputation: 152,279

PreviousNext

Return to Completed Addons

Who is online

Users browsing this forum: No registered users and 2 guests