diff --git a/cocos/core/math/quat.ts b/cocos/core/math/quat.ts index 2b7b4b34fa..2c86d142b4 100644 --- a/cocos/core/math/quat.ts +++ b/cocos/core/math/quat.ts @@ -648,7 +648,7 @@ export class Quat extends ValueType { this.x = x || 0; this.y = y || 0; this.z = z || 0; - this.w = w || 1; + this.w = w ?? 1; } }