0
\$\begingroup\$

I would like to know if Rigidbody2D's can detect collisions with 3D Box colliders and/or normal rigidbodies.


I seem to have a problem where my 2D Colliders don't detect collision with my 3D Cubes. :/

\$\endgroup\$
3
\$\begingroup\$

No, the 2D and 3D physics worlds in Unity are treated completely separately, using different internal physics engines (2D is using Box2D, 3D uses a variant of PhysX)

If you need 3D physics, then the simplest way is to handle all of your physics objects as 3D, with appropriate constraints to keep the 2D objects from rotating out of their intended viewing plane.

\$\endgroup\$
1
  • \$\begingroup\$ To Hamza Hasan: I see your edit suggestion, but in this case it conflicts with the intent of the existing answer, which is based on the premise "If you need 3D physics..." You're right that it's possible to attach 2D colliders to 3D geometry/particle systems, or even to objects with no visual at all, and if you'd like to elaborate on that suggestion then I recommend adding it as an additional answer. Note, however, that using 2D physics prohibits physical reactions along one axis globally, while using 3D physics as a base allows these reactions to be permitted selectively. \$\endgroup\$ – DMGregory Feb 10 '16 at 20:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.