• Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by fred_gds · Feb 22, 2017 at 01:06 AM · collideriphoneerror messagexcodeconvex

Error when using Convex MeshColliders on iOS

Hello,

I am currently experiencing the problem that my Game when deployed to my iPhone throws a lot of Errors that seem to be in relation with the MeshColliders that are marked as convex (and also marked as inflate mesh). So these mesh colliders work just fine in the editor. As it seems that the Errors occur when Unity is recalculating them when launching the App, I was wondering whether it is possible to save the precomputed ConvexColliders from the editor to enhance loading performance and to get rid of those errors.

The Error I get is:

 (Filename: /Users/builduser/buildslave/unity/build/Runtime/Mono/MonoScriptCache.cpp Line: 382)
 
 ConvexHullBuilder: convex hull has more than 255 polygons!
  
 (Filename: /Users/builduser/buildslave/physx/build/Source/PhysXCooking/src/convex/ConvexHullBuilder.cpp Line: 1479)
 
 Gu::ConvexMesh::loadConvexHull: convex hull init failed! Try to use the PxConvexFlag::eINFLATE_CONVEX flag. (see PxToolkit::createConvexMeshSafe)
  
 (Filename: /Users/builduser/buildslave/physx/build/Source/PhysXCooking/src/convex/ConvexMeshBuilder.cpp Line: 253)
 
 Failed to create Convex Mesh from source mesh "001_Body_Centered". Source mesh is likely have too many smooth surface regions. Please reduce the surface smoothness of the source mesh. Alternatively turn on Inflate Mesh and increase the Skin Width sufficiently for this mesh.

EDIT: A strange thing happened. I also tried to build the scene without the "convex" option checked on all MeshColliders and I still get the Errors. Also I don't really get why the error occurs as "Inflate Mesh" is activated and not throwing errors in the editor.

Comment
Add comment · Show 2
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Bunny83 · Feb 22, 2017 at 01:40 AM 0
Share

throws a lot of Errors that seem to be in relation with the $$anonymous$$eshColliders

Uhm, don't you think that it would make sense to actually include those "errors" here in your question?

And no, you can't do any additional preprocessing. $$anonymous$$eep in mind that the actual collider is a construct of Physx and not Unity.

The only known issue a convex $$anonymous$$eshCollider has is when your mesh doesn't have any volume. So for example when the mesh is a single quad but also when all vertices are in the same plane like the default Plane mesh.

avatar image fred_gds Bunny83 · Feb 22, 2017 at 01:51 AM 0
Share

I included the Error $$anonymous$$essage but I didn't think it was really necessary for the workaround question...

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by fred_gds · Feb 22, 2017 at 06:30 AM

So I found a solution. I could not directly access the convex Mesh created by PhysX so I used MIConvexHull (http://miconvexhull.codeplex.com) to create new meshes with less then 255 polygons. Those don't throw any Errors so kind of worth the trouble.

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Welcome to Unity Answers

The best place to ask and answer questions about development with Unity.

To help users navigate the site we have posted a site navigation guide.

If you are a new user to Unity Answers, check out our FAQ for more information.

Make sure to check out our Knowledge Base for commonly asked Unity questions.

If you are a moderator, see our Moderator Guidelines page.

We are making improvements to UA, see the list of changes.



Follow this Question

Answers Answers and Comments

87 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Which version of Xcode does Unity 3.5.5f3 support? 1 Answer

Unity modules for iOS? 1 Answer

generated box mesh collision causing convex hull init/computation failed error 1 Answer

Debugging NullReferenceExceptions in iOS Games 2 Answers

Help on iOS Build in the iPhone 1 Answer

  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges