Translate
Monday, March 3, 2014
Collision WORKING!
Sorry for not having posts for a couple of days, I just hadn't got much done (other than in Minecraft but you don't care about that stuff). I finally finished the collision code it, and now works properly. You may be asking so how does it work? The thing is this collision code is different than the common, sloppy way of just moving the player back to where they where when they hit a wall. In this collision code when a wall is hit it actually calculates how much the player needs to move so that he will be 1 pixel away from touching the wall. See the problem with other people's collision is that because they move the player where they where before there are pixels in between the player and wall. This is ugly and sloppy in my opinion. I am still having problems (currently with class initialization, but I identified the exact problem.) Tomorrow I'll try to upload my project I finished for Computer Graphics Design II.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment