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. Dismiss Notice

mixing 2d and 3d in a game

Discussion in '2D' started by zardtomcat, Jan 10, 2015.

  1. zardtomcat

    zardtomcat

    Joined:
    Jan 10, 2015
    Posts:
    17
    Hi,

    I like to create a 3d scene where players can walk around and touch 3d objects. When a 3d object is touched then the player is shown a 2d scene which he can interact with.

    Has anybody done this and can advise on any problems with it?
    Is there an example anywhere that I can look at?

    Zardtomcat
     
  2. BlueSin

    BlueSin

    Joined:
    Apr 26, 2013
    Posts:
    136
    You will need to be very careful when it comes to 2D & 3D as you cannot mix and match them together. 3D collisions, rigidbodies, physics, etc. will only affect other 3D objects and the same can be said about 2D objects. I have never done what you mention before. But I would imagine it would be fine if you confine the 2D and 3D objects to their own spaces or even separate game scenes.
     
  3. zardtomcat

    zardtomcat

    Joined:
    Jan 10, 2015
    Posts:
    17
    Ok, thanks. Will it work if I create a separate scene for each 2d scenes as I have a few of them?
     
  4. Eric5h5

    Eric5h5

    Volunteer Moderator Moderator

    Joined:
    Jul 19, 2006
    Posts:
    32,400
    There's no problem mixing 2D and 3D since they are really the same thing (sprites are just textures on quads basically). It's only the physics engines that are different. You can use 3D physics on sprites if you want.

    --Eric
     
  5. zardtomcat

    zardtomcat

    Joined:
    Jan 10, 2015
    Posts:
    17
    Ok, great. Have you come across any examples in the tutorials that you can point me to?
     
  6. theANMATOR2b

    theANMATOR2b

    Joined:
    Jul 12, 2014
    Posts:
    7,790
    A verbal example to compare is when a character approaches a 3D save point in a 3D game. When the character clicks on the 3D object - in a lot of games a 2D scene will pop up to allow the save function. This is essentially similar - but different. Usually the save interface is 2D which can be interacted with. I'm sure your idea is more complicated but may want to start at the basics of a concept and work towards more complex iterations of the concept.

    Sounds like an interesting prototype project.
     
  7. DustyMcp

    DustyMcp

    Joined:
    May 23, 2013
    Posts:
    25
    Maybe use the new UI tools instead for making small 2d game elements ?