[Cocos Creator 3.8.0] Scale up then scale down tween make the node untouchable

Hi, I think I have found a bug of Cocos Creator 3.8.0, I write a simple code like this

onLoad() {
    this.testNode.on(Node.EventType.TOUCH_END, () => {
      console.log("touch end");
    });

    tween(this.testNode)
      .to(2, { scale: v3(1.2, 1.2) })
      .to(2, { scale: v3(1, 1) })
      .start();
  }

The touch end callback is not fired when I click on the node since in is scaling down.
Here is the demo.
Test-touch-tween.zip (6.4 MB)

Hello, this problem is because the scale does not set the z value caused, if the 2D UI implementation scale tween , then you need to set z to 1.

1 Like

scale needs 3 vectors, x, y, and z? With 2D games, you don’t need the z, but still need it there as v3 needs a vec3. So just add (?, ?, 1) to it and should run. Check my video on Tween on YouTube. You can download the project in the store.

Thanks, I have used setScale wrong for a long time :rofl: