[3.8.7] 3D 为什么我移动刚体去碰撞墙体 会陷进去?

如下面所示,会陷进Cube里,然后松开不动就会被挤出来
ezgif-7f34f9799c945a

用的cannon.js
image

刚体和碰撞和物理材质是这么设置的:
image
image

墙壁Cube碰撞什么也没改
image

下面是移动代码,用的刚体的setLinearVelocity

public moveWithDirection(moveDir: Vec3, dt: number): void {
        if (!this._rb) return;

        if (!moveDir || Vec3.equals(moveDir, Vec3.ZERO)) {
            this._rb.setLinearVelocity(new Vec3(0, 0, 0));
            return;
        }

        moveDir.normalize();
        let currentVelocity = new Vec3();
        this._rb.getLinearVelocity(currentVelocity);
        const targetVelocity = new Vec3(moveDir.x * this.speed, currentVelocity.y, moveDir.z * this.speed);

        this._rb.setLinearVelocity(targetVelocity);
        this.updateRotation(moveDir, dt);
    }

    protected updateRotation(moveDir: Vec3, dt: number): void {
        if (this._lockTarget) {
            this.faceTarget(this._lockTarget, dt);
            return;
        }

        this.faceMoveDirection(moveDir, dt);
    }

    protected faceMoveDirection(moveDir: Vec3, dt: number): void {
        if (Vec3.equals(moveDir, Vec3.ZERO)) {
            return;
        }

        let targetRot = new Quat();
        const rot = new Vec3(moveDir.x, 0, moveDir.z).normalize();

        if (rot.lengthSqr() > 0) {
            targetRot = Quat.rotationTo(new Quat(), Vec3.UNIT_Z, rot);
            const currentRot = this.node.getRotation();
            const desiredRot = Quat.slerp(new Quat(), currentRot, targetRot, this.rotationSmoothTime * dt);
            this.node.setRotation(desiredRot);
        }
    }

有没有大佬救一下呀,主要是参数和隔壁同事一样的,他能正常碰撞碰撞体不会陷进去,都用的设置线性速度

解决了,是我在start函数里设置了一下Rigidbody的angularFactor的原因,删了就好了