Jump to content

Height of a point on the ground


Recommended Posts



How do I get the height (Y-Axis) of a point on the ground by pickinfo. I would like to add to the grass when we click on a points of ground.

I am missing just the point Y of the place clicked for that my grass is not below the ground when she is added.


Thank you for your help.

Link to comment
Share on other sites

Thank you, but I was talking about to retrieve the point Y of the terrain when I click on a places any of the ground.
here on a pickedpoint, it retrieves the position x and z of an object. The x and y position of a pickedpoint are in a world 2d and me I wish the Y position of the 3d world.

Link to comment
Share on other sites



You should have a look to the Worldmonger demo. on babylon website. I think there is what you want.


Another solution would be at start up to store in an array each pixels of your heightmap . After with your event x z and few calculations, just look in the array at the right index  to get your y elevation (the gray level), etc..and adapt it to your world.



Link to comment
Share on other sites

Thank you Samuel. I know this Worldmonger demo. I use it in my project where I've added functionality for my game editor. But I do voi not where recover the height of a point following the click. I'll look again.


May be that Deltakosh would have a idea?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...