0
\$\begingroup\$

I'm trying to figure out why my polygon colliders default to pentagon shapes when I build my app and test it on a device.

I have a scene with some blocks you can drag around where the colliders work perfectly fine in the Unity editor and takes the shape of whatever image its attached to.

However, once I build the app for iOS and run the scene on my device, I've noticed the collision is way off. I created a way to draw the collider during runtime in a build and found that the shape of all the colliders are pentagons.

Why does this happen? I'd assume that polygon colliders don't work for complicated shapes but the rounded rectangle shape shouldn't be that complicated right?

enter image description here

\$\endgroup\$
2
  • \$\begingroup\$ For those Buttons I would just use a normal rectangle collider. To help you with your problem, a screenshot of setting up your collider and maybe the export build setting could help \$\endgroup\$
    – Zibelas
    Jul 27 at 20:21
  • \$\begingroup\$ Please provide the steps and code needed to produce a Minimal Complete Verifiable Example. Once a reader can reproduce this problem independently, we can test potential fixes to be sure they'll solve it for you. \$\endgroup\$
    – DMGregory
    Jul 27 at 20:34

0

You must log in to answer this question.

Browse other questions tagged .