Quote:
Originally Posted by 12171217
I had something where the world was represented as lines stored in arrays instead of tiles, it handeled slopes easily and perfectly (Just draw a collision mask over the level).
There's tons of examples of line intersection algorithms online, then just find the line you hit's normal and you can work off that.
Alternatively you could just as easily automatically convert the tiles into lines for collision.
|
Well, could come up with an algorithm to create the lines on slopes, just make lines from corner to corner of blocking tiles. The rest could be handled normally.