Skip to content

Commit

Permalink
fixed #16762: [3.8.2] Incorrect 3D Particle Rotation Effect (#16763)
Browse files Browse the repository at this point in the history
  • Loading branch information
dumganhar authored Mar 4, 2024
1 parent afa8e13 commit 6f948c6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion native/cocos/math/Mat4.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -553,7 +553,7 @@ bool Mat4::decompose(Vec3 *scale, Quaternion *rotation, Vec3 *translation) const
}

// Scale too close to zero, can't decompose rotation.
if (scaleX < MATH_TOLERANCE || scaleY < MATH_TOLERANCE || std::abs(scaleZ) < MATH_TOLERANCE) {
if (std::abs(scaleX) < MATH_TOLERANCE || std::abs(scaleY) < MATH_TOLERANCE || std::abs(scaleZ) < MATH_TOLERANCE) {
return false;
}

Expand Down

0 comments on commit 6f948c6

Please sign in to comment.