Walking up/down vertical stairs

Discussion in 'Game Development (Technical)' started by alexoy, Mar 31, 2018.

Tags:
  1. alexoy

    alexoy New Member

    Joined:
    Jan 8, 2017
    Messages:
    4
    Likes Received:
    0
    Hello!

    I'm exploring a HTML5 game world, 3D, JavaScript. But I think this is a common task. Unfortunately I have no ideas how to implement a correct walking up vertical stairs. Not standard, but completely vertical. Can you please give me some ideas how this should be done? My game engine has collisions detection included.

    Example problems I have during experiments (movement with AWSD keys):

    1. If player is exactly at the corner of the ground and stairs - how to detect where it should go when pressing W, up or forward; when pressing S - back or down;

    2. If player is already on top of stairs - how to detect that now he should go forward on W key, instead of up;

    3. When player goes down and reaches the ground he must start going immediately in horizontal direction instead of down.



    These are general questions/problems, which maybe can be solved by using a correct method, I don't know. Can you please explain how to do correct walking up in terms of objects/meshes/positions/simple math/collisions ?



    Thanks!
     
  2. Gameicreate

    Gameicreate New Member

    Joined:
    Mar 6, 2018
    Messages:
    53
    Likes Received:
    0
    what is your goal for posting this kind of thread? I don't understand your topic.. it is like general mathematics question.
     
  3. alexoy

    alexoy New Member

    Joined:
    Jan 8, 2017
    Messages:
    4
    Likes Received:
    0
    Maybe it really is. I ask for general recommendations, which I could try to implement technically. The problem is that I do not have a complete understanding how this climbing up should work
     

Share This Page

  • About Indie Gamer

    When the original Dexterity Forums closed in 2004, Indie Gamer was born and a diverse community has grown out of a passion for creating great games. Here you will find over 10 years of in-depth discussion on game design, the business of game development, and marketing/sales. Indie Gamer also provides a friendly place to meet up with other Developers, Artists, Composers and Writers.
  • Buy us a beer!

    Indie Gamer is delicately held together by a single poor bastard who thankfully gets help from various community volunteers. If you frequent this site or have found value in something you've learned here, help keep the site running by donating a few dollars (for beer of course)!

    Sure, I'll Buy You a Beer