- Home /
game hags with several Polygon Colliders on the scene
Hello,
Recently I have got a problem with my 2d game project, and that confuses me a lot. The game is working fine on PC, but hangs on a splash screen when running on android (Nexus 5). Hangs forever, game actually is never started.
It took me a lot of time to determine why this is happen. I even recreate whole project step by step, constantly trying to run it on mobile phone.
I have discovered that when I'm adding second "Polygon Collider 2d" to the object (1 polygon collider per 1 object), the game just stopped working on my phone. Hangs on splash screen. Right after I have deleted that second polygon collider from object - everything is working again.
Can anybody explain why this happens? what I'm doing wrong? I have assigned simple "Box Collider 2D" on each of my objects end it works perfectly on the phone. Bu I need to have polygon colliders.
How many polygons per polygon collider? They are extremely expensive for the physics/collision engine. You'd be better off with a conglomeration of sphere/box colliders.
I dont know how to count polygons precisely. I mean they have a triangle form, and unity not always draw each of them. $$anonymous$$ost likely it is a several dots linked to each other by straight lines. But anyway, the object has complex shape, and I think there is at least 30 polygons for each of them. Thank you for advice, I will try to stay away from such complex colliders
Your answer
Follow this Question
Related Questions
Need help on my script to calculate gravity for a mass 1 Answer
Check if 2D Player is grounded with Physics2D.Linecast 1 Answer
All Sprites Instantiate In top right of screen for some reason. 0 Answers
Calculate the normal of a collider 1 Answer
Rotating an object to match a rigidbody's direction of movement. 2 Answers