Closed alejandrodecea closed 5 years ago
I am sorry but unfortunately I am not confident that this won't break existing projects. Furthermore, the package.json should only be updated by the maintainers when a release is to happen.
Apologies for taking so long to answer, upon closer review in the original potree I believe that the camera position isn't being used in the pick function (see it here). I might be wrong though.
P.S.: I made all those other changes in order to be able to publish the package to npm and use it in my own project, I didn't realize they were being reflected here as well.
I recently noticed @Zielon included a pixelPosition parameter for the picking function. Now I can input my own pixelPosition using the ray.origin instead of the camera.position. Thank you kindly for that!
In case you've got something like Three.js's PointerLockControls, the camera's relative position will always be (0, 0, 0), with this change, now it's possible to use the point picking function with such camera systems.