Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

3D object on a 2D scene (Solved)

Discussion in '2D' started by maxrio, Apr 30, 2015.

  1. maxrio

    maxrio

    Joined:
    Jan 8, 2015
    Posts:
    25
    Greetings. Can I use a 3D object on a 2D scene? How to make the collisions in this case?
     
  2. TomasJ

    TomasJ

    Joined:
    Sep 26, 2010
    Posts:
    256
    Yea you can. Just use sorting layers and correct shaders (all default sprite shaders go in to the Transparent render queue) to layer your objects.

    As for collisions - you can still apply a 2D collider to your 3d object, but make sure to only rotate the collider on the Z axis, as 2d physics works on the XY plane.
     
  3. maxrio

    maxrio

    Joined:
    Jan 8, 2015
    Posts:
    25
    I tried what you recommended but can not activate the collision. The objects pass through.
     
  4. Stef_Morojna

    Stef_Morojna

    Joined:
    Apr 15, 2015
    Posts:
    289
    You could do a child object and add the 2d collider to it.
     
  5. maxrio

    maxrio

    Joined:
    Jan 8, 2015
    Posts:
    25
    Thank you very much. It worked perfectly.