RNull Posted February 26, 2018 Share Posted February 26, 2018 Hey Everyone, So I have a mesh which I use as ground, but since I need it exported from blender ( altogether with a navigation mesh ) I cant use the GroundMesh methods such as "getHeightAtCoordinates(x, z)". Right now I have implemented RayCasting for the task and is working quite good, however I need a more efficient way of doing it and since I am looking for one thought to ask here as well. If someone can point me to a direction how to approach this it would be amazing. Cheers! Quote Link to comment Share on other sites More sharing options...
RaananW Posted February 26, 2018 Share Posted February 26, 2018 getHeightAtCoordinates works only under the assumption that certain variables exist and are the ones who built the mesh. It is a form of cache that is stored in the class itself to fetch the height with minimum realtime computations (check the _computeHeightQuads function of GroundMesh to understand what is being done). You could create the same form of cache, and fetch it without rays. There will be a bit of computation needed at the beginning, but it will be rewarding afterwards. 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.