celian-garcia Posted July 21, 2014 Share Posted July 21, 2014 (edited) Hello !I found that the getHeightAtCoordinates function of GroundMesh return wrong value when the ground position has been changed.Here is a playground to illustrate what I'm saying. http://www.babylonjs.com/playground/#RVTBV#4 In the playground the position of the mesh is set to (2, 2, 0) but the function return 4 (it should return 2).We could also consider that the value to return must be in the local space of the ground but even if it is the case, the value should be 0, and not 4. So I modified the function and it returns now the good value. * You can as you want change the ground position with variable groundPosition* You can also easily change the x and z coordinates of intersection with the variable coord Is there something wrong in the way I use the function or is it a bug ? PS: return values are displayed in the console Edited July 21, 2014 by kostar111 Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted July 21, 2014 Share Posted July 21, 2014 You're absolutely right ! I'll fix that quickly Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.