x


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;

alt text

Table frame;

alt text

I've tried setting all mesh colliders to convex, but it makes no difference.

Cheers

Carl

hockeypuck.png (519.7 kB)
tablemesh.png (427.0 kB)
more ▼

asked Jul 14 '12 at 01:51 PM

cbruiners gravatar image

cbruiners
1 1 1 1

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.

Jul 14 '12 at 01:56 PM whydoidoit

Do I have to create the colliders in Max 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.

Jul 14 '12 at 02:03 PM cbruiners
(comments are locked)
10|3000 characters needed characters left

2 answers: sort voted first

You cannot have a Mesh Collider and a Box Collider on the same object (atleast I think so)

more ▼

answered Jul 14 '12 at 02:14 PM

Mold gravatar image

Mold
114 4 5 10

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).

Jul 14 '12 at 02:56 PM cbruiners

You could try replacing the box collider with a spherical one, just a thought though.

Jul 14 '12 at 03:32 PM Blink

I did try that, but it causes odd behavior when colliding with the puc... I'd need to be able to modify the collider

Jul 14 '12 at 03:43 PM cbruiners
(comments are locked)
10|3000 characters needed characters left

Can I using the transform method on the collider to modify its shape? And without effecting the actual model the collider is attached too?

more ▼

answered Jul 14 '12 at 05:46 PM

cbruiners gravatar image

cbruiners
1 1 1 1

(comments are locked)
10|3000 characters needed characters left
Your answer
toggle preview:

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

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Topics:

x62

asked: Jul 14 '12 at 01:51 PM

Seen: 592 times

Last Updated: Jul 14 '12 at 05:46 PM