I want to load all points on the screen where camera is or load all points from the pointcloud and then I want to raycast on that.
problem is when I raycast on that sometime if points are not loaded then it is not detecting the point and generating wrong output.
My function
export function loadPotree(Potree, path) {
return new Promise((resolve, reject) => {
Potree.loadPointCloud(
path,
'',
(e) => {
resolve({ pointCloud: e.pointcloud, res: e });
},
(error) => {
reject(error);
},
);
});
}
But it does not load all point where camera is, so how can I do this ater all points load.