box3.intersectsPlane bug

In the following example, the plane obviously intersects with the box, but the function intersectsPlane returns false.
I find that adding two negative sign before both of the plane.constant can fix the bug.

return ( min <= plane.constant && max >= plane.constant );

Also, I think the definition of the constant of the plane is not distinct, which cause the bug.

Three.js version
  • Dev
  • r96
  • All of them
  • All of them

Author: Fantashit

1 thought on “box3.intersectsPlane bug

Comments are closed.