Point'n'click terrain and optimization

That’s actually exactly what I used to do before.
The problem was that to pick the y position of the plane, I made an average of the y position of all the waypoints of the floor. So when the terrain was getting bumpy, or when the average was completely off for some part of the map, the precision issues were very noticeable (or downright ruining the experience of the game in the worst cases).
But yeah it was pretty fast :slight_smile: !

From what I can gather on google, this looks like a good way to implement the cutting of the terrain.
This topic might help, if I can port the code to C++:

Thanks a lot for all the details ! It helps a great deal !
This looks very promising: I’ll check out the octree, and if I get it to work properly I’ll come back with a C++ port of the ‘Egg Octree’ script.