How to know whether the object is surrounded by other objects
Currently I have an object that will move by itself, if it is surrounded by other objections, it will be destroyed. Not to sure how can I achieve it. Now I am able to build those grey block around the red dot but I'm not sure how can I make the red dot know it is surrounded by grey blocks so it is not able to move anywhere. Here is a demonstration:
3.png
(10.9 kB)
Comment
if the objects have colliders you can use Physics.Raycast.
Your answer
Follow this Question
Related Questions
How do you pick up an instantiated object? 1 Answer
I want to spawn objects probabilistically. 0 Answers
Destroy, deactive or hide 0 Answers
Give Clones a Tag or Function 1 Answer
How to make a smooth rotation? 1 Answer