- Home /
Is is possible to identify if the object is inside another?
Hello, My map will have areas that I will use and need to separate. I was thinking in making the areas as invisible/transparent cubes, but I need a way to tell if the player is inside one of this areas and witch area. Is there a way to test if an object is inside this cube-area? I needed to make this test from time to time and want to make this test inside a function called by an InvokerRepeating. Is it possible? How?
Answer by Lupus · Oct 26, 2014 at 09:19 PM
If someone happens to find this question, the answer is:
area.collider.bounds.Contains(renderer.transform.position)
Where area is a GameObject
Your answer
![](https://koobas.hobune.stream/wayback/20220613152500im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Application.LoadLevel When inside a area. (Only script) 1 Answer
instantiate gameobjects into area 1 Answer
Is OnTriggerEnter always fired when an object is already inside? 0 Answers
instantiate objects within an area 2 Answers
Is it possible to open a unity game/application on an iphone/ipad inside a regular app? 2 Answers