Quantcast
Channel: Latest Questions by Wrymnn
Viewing all articles
Browse latest Browse all 131

Checking area via code or detection collider

$
0
0
What do you think is better for performance? - Thousands of objects checking for enemies around via code? - Or thousands of objects checking for nearby enemies with its attached, say Circle collider? So lets say you have turret and it checks for enemies around it if they are close. Both have advantages and disadvantages. Getting vector and sqrMagnitude and then comparing it to nearest object, can have have lag spikes if doing it for thousands of objects lets say every 1 second. But having additional thousands of moving colliders on scene can have impact too.

Viewing all articles
Browse latest Browse all 131

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>