The character angle?

How to implement the movement of the hero to the mountain, ie at a certain angle in the game is based on tiles (tiles)? Where you can read about it?
July 4th 19 at 23:19
2 answers
July 4th 19 at 23:21
Will tell you how I did. Wrote in Java ME, so very complex ideas were not.

Each tile was specified algorithmically surface (pavement). In the newer version of the engine fitted and the ceiling — well, never mind.
For simplicity, let's introduce some restrictions. They all, of course, cost is complicated logic.
• On anything other than tiles, the character can not stand. Then you can do flag: isSupported: true/false.
• Climbing the slope, the character will not hit your head on the ceiling. By the way, we had two different Gandesa and two different approaches — when one saw this bug, went to complain, took second limitation on the pencil and do not make such levels.
• The bumps are large enough to be able to check the legs on the left and the right feet — and it is clear how high it stand.
• The ratio of "square foot / size of the HitBox" is large enough, while the character is falling, it is guaranteed to be pushed out of the wall.
Depending on the speed of the character and steepness of slopes will pick up the epsilon — range surface search.
Suppose our character is standing on something and move it to the right.
1. Move it to where it needs to be.
2. Try to adjust the height, taking the right side of the legs and finding a new surface in the range (y — epsilon, y + epsilon). The same with the left foot. That above is our new y. If you did not work — DEPENDS on (see step 3).
3. If in step 2 the character is not against a wall, then check out the focus the whole HitBox. If it will push it out of the wall, again it will adjust the height according to principle 2.
Thank you very much) You always Have the answer geymdevu) - aimee.Becker57 commented on July 4th 19 at 23:24
Awesome! Thank you! - Kyleigh_Hills commented on July 4th 19 at 23:27
July 4th 19 at 23:23
I've done through the calculation of the displacement vector between the two positions, and inclination angle, taking into account all the physical parameters of the game world:

Find more questions by tags CanvasDevelopment of gamesHTMLJavaScript