Solid 3D walls

Discussion in 'Game Design, Development And Publishing' started by Dan Williams, Nov 20, 2018.

  1. Dan Williams

    Dan Williams Member

    Joined:
    Nov 16, 2018
    Posts:
    3
    Does anyone know the code to make 3d walls solid?
    in Game maker studio

    Cheers
     
  2. Mert

    Mert Member

    Joined:
    Jul 20, 2016
    Posts:
    133
    Game Maker does not offer collision for 3D system, we basically do 2D collision for them. What's your game's orientation ? Top down, fps, platformer ?
     
  3. Dan Williams

    Dan Williams Member

    Joined:
    Nov 16, 2018
    Posts:
    3
    Its an First person maze game
     
  4. BattleRifle BR55

    BattleRifle BR55 Member

    Joined:
    Jun 24, 2016
    Posts:
    832
    Unless you plan on having ramps and multiple levels and such, standard 2D collisions should suffice.
     
  5. Yal

    Yal Member GMC Elder

    Joined:
    Jun 20, 2016
    Posts:
    3,250
    As others have said, you'll need to code a collision system by yourself if you need 3D collisions. However, for simple cases you could get away with a pretty easy hack: have 2D collisions like normal, but add in a check to compare Z and height values. If the objects just overlap in the 2D plane but doesn't overlap in Z as well, just abort without doing the actual collision stuff. To have a collision in 3D, you need to overlap both in X, Y, and Z.

    And of course, for games like mazes and racing, you're usually stuck in the XY plane all the time anyway, so you don't need to code 3D collisions, you just use 2D collisions but add 3D graphics.

    (I've made an asset for this kind of stuff, btw: https://yaru.itch.io/yarufps ... it's not super flashy or anything, but it exists)
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice