Cc.sequence in cc.sequence duration bug + cc.moveBy() bug

Example

Working example (notice: .repeat(1);

const sequence1 = cc.sequence(
	cc.moveBy(1, cc.p(0, -300)),
	cc.moveBy(1, cc.p(0, 300))
).repeat(1);

const sequence2 = cc.sequence(
	cc.callFunc(() => {
		cc.log('first');
	}),
	cc.callFunc(() => {
		cc.log('ready');
}));

this.node.runAction(
	cc.sequence(
		sequence1,
		sequence2
	)
)

When you change to repeat(2) the durations of the cc.moveBy will actually be 0.5s instead of 1. If you do .repeat(4); the cc.moveBy duration will be 0.25… etc.

This means the animation will always run in 2 seconds and it does move it the amount of repeated times but with more speed.

If you put repeat(10) or such it will go insanely fast since it has to go through 10 times in still 2 seconds, even though every duration of the cc.moveBy should be 1 second (with 10 repeats total of 20 seconds). This fast movement also leads to next bug that is below.

Another bug is also that if you cc.moveBy too fast you will lose position and even though you move things up and down the same amount, they won’t end up in the same position where they started, even though it should. Would like to know solutions for that as well.

Thanks!

By using cc.moveTo() you can animate things fast and it will remember the positions. With cc.moveBy() it bugs out if moving too fast. In my case I can use cc.moveTo() as well, so that is solved. But I guess it’s good to fix the cc.moveBy().

cc.sequence duration issue/bug is still valid.

A solution for me to this would also be to have a callback from the cc.sequence().repeat():

const sequence1 = cc.sequence(
	cc.moveBy(1, cc.p(0, -300)),
	cc.moveBy(1, cc.p(0, 300))
).repeat(10)
.then(() => { /* This or similar callback doesn't exist from what i know? But would be VERY useful! */
	cc.log('now it has repeated 10 times successfully');
})
1 Like

Where can I report bugs in a better way than on this forum?

You should post it on github issues.

Thanks. I Created an Issue on github: