- Home /
Detect if connected to other builds
I'm making a fortnite like building game, and I have the building part downpacked, but now, the player can build in the middle of the air. I need someway to detect if I'm part of a build, or in the air. I already have a system that uses a trigger collider to detect if it's touching another build, but it's not working correctly. I though of using OverlapSphere, but that didn't work either. How can I do this?
Answer by suIly · Oct 03, 2019 at 07:37 PM
I used void Check() { if (!connection && checkedAlready) { StartCoroutine(drop()); } colliders = Physics.OverlapSphere(transform.position, radius, groundLayer); GetNearestBuild(colliders); if(!connection) { StartCoroutine(drop()); } }
and it worked
Your answer
![](https://koobas.hobune.stream/wayback/20220612212922im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Distribute terrain in zones 3 Answers
Multiple Cars not working 1 Answer
Return a string[] of all the scenes in the build settings 1 Answer
Insert HTML iframe at Unity 0 Answers
Built project, now scripts are missing. 2 Answers