Search Unity

Create a 2D platform across multiple planes in the 3D world

Discussion in '2D' started by R3aper235, Jul 5, 2019.

  1. R3aper235

    R3aper235

    Joined:
    Feb 15, 2013
    Posts:
    16
    Hi,

    I wanted to know if it is possible to create a 2D platformer (based on collisions or raycasts) across multiple planes in the 3D world where 1 plane could be the XY and the other plane would be YZ. I want the player to be able to platform from one plane to the other.
    If it is possible, then how? I am okay with hacks as long as it doesn't compromise a lot with the performance.
     
    Last edited: Jul 5, 2019
  2. TigerDawn

    TigerDawn

    Joined:
    Aug 4, 2018
    Posts:
    20
    Yeah, sure... done it myself. But in reality unless you explain it a lot to the user, they will just assume everything is random and quit playing.
     
  3. R3aper235

    R3aper235

    Joined:
    Feb 15, 2013
    Posts:
    16
    Yes that would a problem for some other time but right now I am trying to just make it work. Would you mind sharing how you did it? The only possible solution that comes to my mind is by avoiding 2d altogether and using 3D physics.
     
  4. TigerDawn

    TigerDawn

    Joined:
    Aug 4, 2018
    Posts:
    20
    I used 2d orthogonal with teleport spots, and when they stepped on a teleport spot it showed an animation of either sliding to the side/up/down (aka. standard) or the 3d effect I mapped a 2d orthogonal plane in the 3rd dimension to the side of a cube, and animated the rotation of the cube as though moving from one face of a cube to another. (zoom out, show rotating cube, zoom in)

    I do not have a live example I can share.
     
  5. R3aper235

    R3aper235

    Joined:
    Feb 15, 2013
    Posts:
    16
    Yeah I had a similar 'hack' in mind where I would map the planes to a single 2D plane and somehow show them as different. But that showing part was something I wasn't sure of.
    Its hard to visualize your implementation without any visual reference but I get the rough idea. I guess that zoom out , show and zoom in part is just to make it look like separate 2D planes ?
     
  6. TigerDawn

    TigerDawn

    Joined:
    Aug 4, 2018
    Posts:
    20
    Yeah, it communicates to the user how the world works. I found it cut down on the training time for new users a lot.
     
  7. xwx563617997

    xwx563617997

    Joined:
    May 1, 2019
    Posts:
    1
    Your game sounds like Fez on Steam, is that what you are trying to achieve?