Re-positioning container in timeline between tweens

Hi,
I’m trying to

  • move a container from x: 0 to x: 100
  • reposition the container at x: -100
  • move the container from x: -100 to x: 0

I was thinking of using a timeline to accomplish this.

var timeline = this.game.tweens.createTimeline();

timeline.add({
	targets: myContainer,
	x: 100,
	repeat: 0,
	duration: 5000
});

timeline.add({
	targets: myContainer,
	x: -100,
	repeat: 0,
	duration: 0
});

timeline.add({
	targets: myContainer,
	x: 0,
	repeat: 0,
	duration: 5000
});

While the first and the third tween seem to work, it seems like using duration 0 leads to just skipping tween 2 completely.

Is there any other way to re-position the character between the first and the last tween, or am I just missing something?

Thanks in advance!

:wave:

You can use x: { from: -100, to: 0 } instead.