CascadeStudio
CascadeStudio copied to clipboard
Please notice the bug about coordinate system diff between OCC and THREEJS
Hi author of this demo, I have recently been using your project as a learing demo for OCC. Yet I have noticed a bug about the coordinate system difference between OCC and THREEJS. I set a rayCaster binding to mousedown like this:
// This is under THREEJS Coordinate System? ... let intersects = _this.raycaster.intersectObjects(_this.mainObject.children);
Where intersects give the result of the intersect point(px, py, pz). Then I use:
// This is under OCC Coordinate System? Translate([px, py, pz], Sphere(20));
I found that the sphere is not at the intersect point calculated by THREEJS! Because it appeared elsewhere in the scene.
It Seems that both system use right handed coordinate system but: THREEJS X = OCC X; THREEJS Y = OCC Z; THREEJS Z = OCC -Y;
Please check it out and inform me if you have any clue on this situation.