Non-Convex MeshCollider 设备上不响应碰撞

非凸多边形的 MeshCollider,在 Editor 下响应碰撞,设备上不响应。
并且会报错 CollisionMeshData couldn’t be created because the mesh has been marked as non-accessible.
需要在 FBX 导入的设置开启 Read/Write

这可能是以下情况导致的:

  • When you read from or write to the Mesh data in your code.
  • When you pass the Mesh to StaticBatchingUtility.Combine() to combine the Mesh at run time.
  • When you pass the mesh to CanvasRenderer.SetMesh.
  • When you use the Mesh to bake a NavMesh using the NavMesh building components at run time.
  • When the Mesh is convex, you use the Mesh with a Mesh Collider, and the Mesh Collider’s Transform has negative scaling (for example, (–1, 1, 1)).
  • When you use the Mesh with a Mesh Collider, and the Mesh Collider’s transform is skewed or sheared (for example, when a rotated Transform has a scaled parent Transform).
  • When you use the Mesh with a Mesh Collider, and the Mesh Collider’s Cooking Options flags are set to any value other than the default.
  • When using a Mesh with a Particle System’s Shape module or Renderer module ·when not using GPU instancing.

–EOF–

王小兵 /
Published under (CC) BY-NC-SA in categories Unity  tagged with Unity