I’m creating a beam of attack for less than a second which travels in the straight line. I used ray cast and it was not a viable option to collect all the enemies within a given period of time, because there are AI s moving in random direction . at the moment i used a custom rigidbody collider to collect the data but still I don’t feel “OnTriggerEnter” gives me the desired result. using “OnTriggerStay” will be heavy on CPU for my calculation
You can send out a transform that does a distance check on an array of enemies every second. That will give you a capsule shaped detection in a direction that you can easily change the size of and even give a custom path. You can code it to hit all enemies, a single enemy or any number of enemies.