tentone / potree-core

Potree point cloud viewer library core components for easier integration in a three.js project.
https://tentone.github.io/potree-core/
Other
171 stars 53 forks source link

Point Picking returning NaN #30

Open mandre96 opened 1 year ago

mandre96 commented 1 year ago

Hi! I'm trying to use the point-cloud-octree-picker, but I am having several problems in doing it. With the latest commit, when i hit the point cloud it returns a NaN. I checked the code and it seems that the hit.pIndex does not find the respective position attribute index in the PointCloudOctree.

I already tried switching back to this method of acessing const x = values.array[3 hit.pIndex]; const y = values.array[3 hit.pIndex + 1]; const z = values.array[3 * hit.pIndex + 2];

    point.position = new Vector3(x, y, z).applyMatrix4(points.matrixWorld);

I have tried to reverse the code, however the pickpoint does not work properly. Any idea how I can use this feature?

mandre96 commented 1 year ago

I Jus checked and it seems that the point picking is working fine in pnext/three-loader.

ketourneau commented 1 year ago

We got the same problem. @mandre96 Do you find a solution ?

mandre96 commented 1 year ago

@ketourneau I had to stop using the library, I tried to fix the code and had no success. Decided to use the pnext/three-loader in our project, even tho we had to downgrade the potree converter version.