更改图片scale,EventType.TOUCH_START事件不会被出发的BUG

引擎版本:3.8
问题描述:在一个方法中,我修改了图片的scale,使它镜像翻转或者不翻转.此后它的EventType.TOUCH_START事件就不会再被触发了.

引用
onLoad() {

    this.node.on(Node.EventType.TOUCH_START, this.onTouch, this);

    console.log('LoadingFishRotate onLoad');

   

}

onTouch(event: EventTouch) {

    console.log('Fish clicked! Reward: ' + this.reward);

    director.emit('loading-fish-caught', { reward: this.reward });

    this.scheduleOnce(() => this.node.destroy(), 0.1);

}

startJump() {

    const jumpHeight = Math.random() * (this.maxJumpHeight - this.minJumpHeight) + this.minJumpHeight;

    const jumpDuration = 1;

    const startPosition = this.node.position.clone();

    const peakPosition = v3(startPosition.x, startPosition.y + jumpHeight, startPosition.z);

    const horizontalDistance = Math.random() * (this.maxHorizontalDistance - this.minHorizontalDistance) + this.minHorizontalDistance;

    const endPosition = v3(startPosition.x + horizontalDistance, startPosition.y, startPosition.z);

    const jumpRight = horizontalDistance > 0;

    this.node.scale = new Vec3(jumpRight ? 1 : -1, 1);

求助,问题该怎么解决,即使我在图片边缘附近再点击,也没有触发点击事件.

LoadingGame.zip (70.3 KB)

老问题每天提一遍,scale=new Vec3(jumpRight?1:-1,1,1);重点是z不能为0.

1赞

问题已解决!感谢!
没有填写Z是不是应该报错?或者显示错误?
都能正常显示,却影响到了点击的触发,这个逻辑感觉可以再优化下.