- Home /
No Convex option to enable on a mesh / "is not a member of 'UnityEngine.Collider'"
So I believe, based on what I've read, that making a mesh collider convex will solve a problem I'm having with most spheres passing through blocks in my game (they're both rigdibodies).
From what I've seen, this is achieved by ticking off a small box under Mesh Collider (or, in this case, Sphere Collider) or by including this line of code somewhere:
transform.collider.convex = true;
The problem is the box is not present under the Sphere Collider, and if include the code above i get the error message of " 'convex' is not a member of 'UnityEngine.Collider'. "
I'm running Unity 3.5.6. So is there something obvious here that I'm not seeing? Or is convex just not a feature of this version of the software?
Unless my 3d geometry is very wrong spheres can only be convex, so the convex option is implicit. If you have spheres passing through blocks I'd be surprised if that is related in any way to mesh colliders being convex.
I just realized it IS available for $$anonymous$$esh Colldiers but not sphere or box colliders.
But if what you say is true, well, then the problem is perplexing. I'll have to keep at it. I thought initially it was because the spheres were too small (scaled to 0.1 or smaller), but after i scaled up everything in the level so that the spheres would be scale 1, most of them still passed through the floor blocks.
Your answer
Follow this Question
Related Questions
Re: Maya .FBX and Mesh Collider Issue 0 Answers
Setting Mesh Colliders convex through script 1 Answer
How get mesh from convex mesh collider? 0 Answers
Problem with convex Mesh Colliders 0 Answers
Mesh Collider HELP - 1 Answer