Quote:
Originally Posted by iPhoneDevelopment
Do you know of any good tutorials or examples of more advanced collision detection? I want to know bascially if my character is above, below, or at either side of the block (so that the block becomes solid, and my character can rest on top of it, but can't travel through it from the bottom or sides).
|
I don't know any tutorials, sorry. You could google for "writing a platformer" or "collision detection" - I know you'll find a lot of junk mixed in with the good stuff on that second search.
In general, you should be able to check the center point or frame of your character against the locations of the blocks - if you're above the y will be less, if you're below the y will be greater, etc. If you sketch out "good" and "bad" positions on graph paper should shold be able to see what conditions to check - you have all the info you need (width and height of all object, origin an center point of all objects).