# Colliding 2 completely flat quads with physics?

 0 Imagine you have imported 2 completely flat 2d quads from some 3d app and they are now in the Unity scene, positioned so that you're basically looking at them as two squares on the screen side by side, not necessarily touching. Now, with Unity's physics (colliders, rigidbody, whatever), if I push one of those quads horizontally toward the other quad so that their edges would collide, will it actually collide or will they pass right through each other? My concern is that the quads have `no depth` and therefore they won't collide? ie I guess the physics system cannot do proper 2d you have to always have some depth to your objects to make them collide? more ▼ asked Apr 16 '10 at 06:35 PM ImaginaryHuman 1 37 ● 1 ● 1 ● 2 I should clarify that obviously you need to add some kind of physics collider/rigidbody to do any colliding... but my point is, will they collide as completely flat objects if the colliders are flat? Apr 16 '10 at 06:36 PM ImaginaryHuman 1 @ImaginaryHuman, should you return, please checkmark the right answer, thanks. Jun 26 '10 at 01:50 PM Cyclops add new comment (comments are locked) 10|3000 characters needed characters left ▼ Viewable by all users

 0 No, you can't have completely flat moving physics objects (rigidbodies). You can have completely flat objects which act as Static Colliders - for example, a ground plane which doesn't move. To do this, you would just have a plane with a collider component but no rigidbody component attached. However, if you have a completely flat object (eg, unity's built-in plane), with a Mesh Collider (so that it uses the objects mesh as the collision volume), and you try to add a Rigidbody component, you will get an error from the physics engine. This is because the rigidbody needs some volume in order to have mass, inertia, and these things are impossible to compute if the rigidbody has no volume. If you assign a Box Collider to a game object with a completely flat mesh, the box collider will automatically give itself a tiny amount of depth so that it performs correctly. more ▼ answered Apr 20 '10 at 09:40 AM duck ♦♦ 41k ● 92 ● 148 ● 415 Thankyou Duck, this is a great answer, thanks for the clarity and detail and especially the explaination of `why` this is the case. Apr 21 '10 at 02:13 PM ImaginaryHuman add new comment (comments are locked) 10|3000 characters needed characters left ▼ Viewable by all users
 0 Use box colliders for the quads. more ▼ answered Apr 16 '10 at 07:08 PM Eric5h5 80.2k ● 41 ● 132 ● 519 add new comment (comments are locked) 10|3000 characters needed characters left ▼ Viewable by all users
 0 I have same problem i need to have collision bettwen particles in xoy plane and a 2d map also in xoy plane but i can not find a way to do it... if u got any solutions that oyu can share it will be good more ▼ answered Aug 06 '10 at 11:13 AM Cosmin 11 ● 1 See the above answer from Duck. Unity has kind of two aspects to its collision detection system, one is the collider, the other is the rigid body. The collider can be used to detect that something collided with something else, but not with any `reaction`. You need rigidbody for it to calculate a proper reaction. Or at least, that's how it seems to me. Like Duck said you can have a flat plane with a collider, and since the plane doesn't move it works. So it depends if you have moving objects, which you probably do. Aug 07 '10 at 06:49 PM ImaginaryHuman You could write your own 2D collision routine if you want it to be simple.. e.g. collide rectangles and simply check if the rectangles overlap and then move the quads manually to simulate physics. But if you want to use Unity's physics then you have to give your objects some volume. Your flat quad has to become a box with volume. So long as you use an orthographic projection instead of perspective you'll never see the sides of the box, just the front. Then the physics engine can collide the boxes properly. You can also use rigid body to make the object only rotate in z with no z movement Aug 07 '10 at 06:52 PM ImaginaryHuman add new comment (comments are locked) 10|3000 characters needed characters left ▼ Viewable by all users
 0 well the colliders are invisible so you can make the collider thicker, anyway way i see it but i get what you saying bu cant say i have tried it and you can make the colliders a faction whider so you wont notice how close they might come,. more ▼ answered Mar 16 '11 at 03:54 PM Fathom 2 ● 1 ● 1 ● 6 add new comment (comments are locked) 10|3000 characters needed characters left ▼ Viewable by all users
 0 So there is no such thing as a flat collider that will collide edge-on, it has to be a collider with depth? more ▼ answered Apr 16 '10 at 09:27 PM ImaginaryHuman 1 37 ● 1 ● 1 ● 2 Please don't post comments as answers. It makes baby jesus cry. Apr 16 '10 at 09:30 PM dhendrix add new comment (comments are locked) 10|3000 characters needed characters left ▼ Viewable by all users

By Email:

Topics:

x2488
x1866
x1034
x491
x13

asked: Apr 16 '10 at 06:35 PM

Seen: 2740 times

Last Updated: Apr 16 '10 at 06:35 PM