Help to show the mouse position on terrain

I use the class TerrainBlock to create a new terrain. I attach the TerrainBlock to rootnode in Class RenParticleEditor. So I want to get the mouse position on terrain, not on screen. For instance, when I point the cursor on a specific point on the terrain, the mouse possition will return the position (x,y,z) of the specific point on the terrain. Help me!

Create a Node for the mouse pointer (to be able to display it in the 3d world).

Do the Hello Picking tutorial.

Pick against the terrain every update and place the mouse pointer node in the picking position

1 Like