avoid spawning objects on other ones
Hi, im making a 2d game with c# scripts where a player moving around ,collecting things and so on. The problem i have is : i dont know how to avoid that objects spawns on top of other objects or the player. I know i can use an array and list with spawnpoints but thats not solving the problem with the spawned objects on top of my player. I think there is an allaround solution for this to keep of this, i thought about using trigger to check if the object spawnend on an other object with trigger , then destroy and search new point to spawn. Also i heard about using Raycast. But in both cases i dont know how to do that. Can someone help me please?
There are some answers on this topic. Try some.
Answer by hvd · Nov 07, 2015 at 10:16 PM
Thnx for the link , i've solved it using Physics2D.OverlapCircle
Your answer
Follow this Question
Related Questions
ScreenPointToRay 0 Answers
Basic AI avoidance in 2D 1 Answer
2d object moves only a little then stops 0 Answers
Visualise Physics2D.BoxCastAll 1 Answer
Hookshot in Unity 2D not working,Hookshot 2D not working 0 Answers