I have a mesh collider of a sphere hexahedron and yet it does not collide with my capsule collider. Its some times collides correctly and sometimes not. However I have code so that the mesh gets resized and that the posistion is random. Is it possible that when I resize the mesh it does not keep the mesh collider.
Hi,
If you’re editing the mesh vertices to resize it, you might want to also update Meshfilter.sharedmesh, and Meshcollider.mesh.
I’m not sure how scaling might impact your MeshCollider, but as far as I know, MeshCollider are preprocessed, and editing them at runtime is most of the time not advised.
You may also try using a BoxCollider instead of a MeshCollider with a cube mesh, if you are not planning on using another mesh.