1 Attachment(s)
[help] platforms above platforms
alright, so I'm using the "coordinate rotation" algorithm posted here a while ago by bit101, I added some friction, etc, and got it working pretty well.
unfortunately (and this was an inherent problem that I knew I had to face eventually from the beginning) the way I choose which platform to test a collision against is to see at the very beginning which platform the hero is on top of, and from then on, if he moves left of it, keep checking platforms one to the left until you find the right one, and same with the right. all the platforms are in an array sorted by their _x attribute.
obviously, I run into a problem once I add a platform above another.
does anyone know how to get around this problem, or should I abandon my platform-array choosing algorithm altogether? if so, what's a better way to determine which platform to check collision against, so I don't have to check collision against every platform on every frame?