about collision

Hello. I asked about collision.

I want to get object list in specific sphere or capsule.

Someone answer ‘using OnCollisionEnter, Leave, Stay’.

But I don’t know how do i use it about following issue.

  • Player attack. attack collision shape is capsule.
  • Player get object list is inside collision shape.
  • Player call a OnDamage() function of collision objects.

How can I do above using OnCollisionEnter, Leave, Stay

Other answer.

How can I get collision object list count using OnCollisionEnter, Leave, Stay.

Thanks for reading!

p.s I want to add a OverlayCapsule() function by unity3d :(. I think OverlaySphere is very simple, and usful. Why isn’t OverlayCapsule() function in unity3d? :(.