I need to make a script for my game that is going to spawn trees on the map. There will be different maps that include uneven terrain, water and rocks that trees cannot spawn on. The trees themselves are all of different size and models, but have the same primary part on the bottom of the trunk. What are some ways that I could create such an algorithm?
I was thinking of maybe somehow using raycasts but I’d like to know if there are better ways of going about this before I actually start work on it.