2
\$\begingroup\$

I want to create a custom chaped collider in unity to create point-defense triggers for objects. I have a spherical collider that triggers for attacking objects that enter it already. However I want cone-shaped colliders for point defense to detect and shoot down enemy projectiles in certain areas. enter image description here

I can do this by creating a custom mesh and importing that for the collider. How much of a performance hit can this cause? If you have 1,000 of these colliders active in a scene with objects flying in and out of them, will I see significant performance reduction compared to just using a spherical collider and dropping the cone idea?

\$\endgroup\$
3
  • \$\begingroup\$ have you considered creating the cone by combining a circle and a triangle ? geometrical shapes are so much more efficient \$\endgroup\$
    – dimitris93
    Mar 29, 2015 at 20:20
  • \$\begingroup\$ From my understanding there are no prism colliders unless you create your own mesh. I'm using 3D colldiers and not 2D ones, so it makes it a bit more complicated as far as shapes go. \$\endgroup\$ Mar 29, 2015 at 20:25
  • \$\begingroup\$ "If you have 1,000 of these colliders active in a scene" -- Try it and see. Benchmark it. \$\endgroup\$ Mar 29, 2015 at 20:30

0

You must log in to answer this question.

Browse other questions tagged .