| Jumping and tile collision. |
|
riksweeney
|
Take a look at this
http://www.parallelrealities.co.uk/2011/10/intermediate-game-tutorial-4-tile-based.html Basically, you should check each axis separately, so test the horizontal movement first, then the vertical movement. If the character hits a wall, set the velocity of that axis to 0 and place the character as close to the wall as possible. |
|||||||||||
|
|
||||||||||||
|
Kain
|
Thanks.
I actually figured it out without having to seperate vertical from horizontal collisions. Here is the code for anyone interested. :-)
...And the main loop!
|
|||||||||||||||
|
|
||||||||||||||||

