Moving a point cloud with a mouse


I am trying to make somewhat of an interactive 3D point cloud. Using Python, I can render the point cloud to the world (i.e. a 10x10 grid), but the points are constantly moving since the physical camera is constantly capturing frames. How would I get the z-axis of a specific point if that point is there one second and gone the next? I have mouse collision set up along the 10x10 grid.

I’m not sure that I understand the problem–after all, even if it’s gone he next frame, surely the point is there on the frame on which you’re processing its location…?

I feel like I’m missing the problem–could you elaborate, please?

I think you want the interactive bounding volume of all the points, not the point itself.

It’s a live point cloud, not one that is made based off one frame.

So like a collision box / sphere?

Sure, but in a given update, you should still have the points that were captured in that update.

That is, if you’re rendering something, then you have that something to work with.

Yes, because it follows from your task that eventually you need to move the point cloud, in this case it will be optimal. It is better to have a single clickable invisible field that will contain your point that you are going to click.

1 Like

As per my experience , to handle the constantly updating point cloud, consider implementing ray casting from the camera’s position to intersect with the point cloud when the mouse collides with the 10x10 grid. This will give you the z-axis position of the selected point in 3D space at that moment.

Hope it helps !

Thank you