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!