Hi, I have a Windmill model which I instantiate in my game. Now, I have mountains and stuff on my terrain, so I only want it to instantiate if there is no colliding things around it (terrain, other prefabs). How do I do that?
Thanks!
Hi, I have a Windmill model which I instantiate in my game. Now, I have mountains and stuff on my terrain, so I only want it to instantiate if there is no colliding things around it (terrain, other prefabs). How do I do that?
Thanks!
http://docs.unity3d.com/Documentation/ScriptReference/Physics.OverlapSphere.html
This will detect stuff with colliders in a given radius.