Quantcast
Channel: Questions in topic: "enemy"
Viewing all articles
Browse latest Browse all 1488

DetectSphere - No physics

$
0
0
I have this problem: My player spawns alot of bullets and these bullets need to detect if they've hit an enemy. I've tried to use a method where I filter the closest enemy out of an array of all the enemies that are on screen, but that is way too performance heavy (It's a mobile game) so I tried some Raycasting, but that is just too unreliable. Is there some sort of way you can check if an object is within a certain radius of another object without using colliders and the earlier described function with arrays? I refuse to use any kind of unitys physics because, as said, I've only had bad experiences with physics based hit detection. So please don't answer if you're just gonna say "use triggers and colliders" Thanks in advance.

Viewing all articles
Browse latest Browse all 1488

Trending Articles