刚体碰撞后线性速度变小

  • Creator 版本: 2.4.4

子弹和砖块之间经过碰撞会偶尔出现一个子弹线性速度接近0 ,在屏幕上慢悠悠的移动,子弹的初始线性速度 >= 1000,角速度240

球的刚体参数设置

砖块的刚体参数设置

同时还做了一个线性速度接近0的判断
lateUpdate() {

    //check ball

    if (this.ball_status == EnumBallStatus.onFire) {

        const x = this.getComponent(cc.RigidBody).linearVelocity.x;

        const y = this.getComponent(cc.RigidBody).linearVelocity.y;

        if (Math.abs(y) < 1) {

            cc.log("fix linearVelocity");

            this.getComponent(cc.RigidBody).linearVelocity = cc.v2(x, -10);

        }

    }

}

按理说线性初始速度>=1000 不论怎么碰撞那么线性速度都不会小于1000