From b4a5a7c090f837f6e3c3e777a5ab413d780143aa Mon Sep 17 00:00:00 2001 From: James Chen Date: Tue, 3 Dec 2024 19:46:50 +0800 Subject: [PATCH] [v3.8.5] Fix light probe could not work. (#17999) It's a bug starts from v3.8.5 branch: https://github.com/cocos/cocos-engine/pull/17703 --- cocos/core/math/vec3.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/cocos/core/math/vec3.ts b/cocos/core/math/vec3.ts index 8533bede8b8..5767065eec4 100644 --- a/cocos/core/math/vec3.ts +++ b/cocos/core/math/vec3.ts @@ -955,7 +955,11 @@ export class Vec3 extends ValueType { * @returns Returns `true` when the components of both vectors are equal within the specified range of error; otherwise it returns `false`. */ public equals (other: Vec3, epsilon = EPSILON): boolean { - return Vec3.equals(this, other, epsilon); + return ( + abs(this.x - other.x) <= epsilon + && abs(this.y - other.y) <= epsilon + && abs(this.z - other.z) <= epsilon + ); } /**