I would like to have a box collider, but with a sphere hole collider dug out of the top half of it (think pool chalk for a cue).
I don’t believe there is any way built into Unity that allows me to do this, is there? Hoping I don’t have to use meshes for performance reasons.
If anyone knows how to do this I would greatly appreciate you sharing such knowledge!
As far as I know there’s no built-in way, you’d need some third party plugin or a custom tool. I’d recommend just using a mesh, it’s not like it’ll be that much worse performance-wise than if there was a built-in way. At the end of the day it’s all just points of intersection and having a tool for that would just be for creation of those same points. Maybe the only savings I could see is if they used distance/radius for an “ignore” layer for the sphere cutout, but who’s to say if that actually outweighs the speed of the physics engine just taking a peek at some vertices. Sadly it’s not a candidate for convex collision either, but there’s no way around that.
Mesh means at least 140 tris. Using subtractive method with math (Sphere and AABB) would be so much faster and much more accurate.