- Home /
Mesh collider problem
I'm new to Unity, and have limited experience with 3D software (3D studio max).
I purchased a air hockey 3DS model to be used in my first game, I've written all the JS to handle moving the controller which will interact with the puc.
The problem I have is that it only works if I use a box collider to the controller and table frame (which is the wrong shape for the collision) as whenever I apply the Mesh collider to either the table or controller doesn't work (it doesn't show the green collider outline). My understanding is that every object has to have a mesh? If so, where's mine?
Below are the two objects I'm trying to apply the mesh collider to;

Table frame;

I've tried setting all mesh colliders to convex, but it makes no difference.
Cheers
Carl
In your second picture the mesh collider is disabled. It may also be a problem to do with scaling. In any case you are much better off attaching multiple primitive colliders than trying to use a mesh collider.
Do I have to create the colliders in $$anonymous$$ax with the object and export them? as I've created box colliders but the colliders in Unity other than scale and position cannot be rotated (otherwise I'd use the wheel collider :-) which would be ideal.
It would be great if I could manipulate a collider object in Unity more than just scale and position.
Answer by Mold · Jul 14, 2012 at 02:14 PM
You cannot have a Mesh Collider and a Box Collider on the same object (atleast I think so)
Unity lets me apply both mesh and box colliders to the same object.
I've tried it without the box collider, but my puc / controller just falls straight through the table top (which is a mesh collider @ present, though I'm thinking about changing this because the table top is just a plane).
You could try replacing the box collider with a spherical one, just a thought though.
I did try that, but it causes odd behavior when colliding with the puc... I'd need to be able to modify the collider
Answer by cbruiners · Jul 14, 2012 at 05:46 PM
Can I using the transform method on the collider to modify its shape? And without effecting the actual model the collider is attached too?
Your answer