Gravity in XNA pt.2
Posted: Sat Nov 05, 2011 5:07 pm
Hi all, i`m back with another stupid question:
I finally managed to integrate gravity ( I finished level editors, game states, particles engines et cetera first) but now i`m back to the one thing I hate, physics.
Turns out gravity wasn`t THAT hard to finish ( still, it took my a while ) but now i`m going into collision detection. I`ve managed to apply gravity, it will fall down, but now the whole logic when jumping on tiles et cetera is catching up. The thing is, when I collide, i update the current Y axis to the player, but when i jump into a tile which is higher, i automatically get on top of it.. Kind of annoying, so if anyone is kind enough to help me out.. How do I apply physics in a game that works?
I finally managed to integrate gravity ( I finished level editors, game states, particles engines et cetera first) but now i`m back to the one thing I hate, physics.
Turns out gravity wasn`t THAT hard to finish ( still, it took my a while ) but now i`m going into collision detection. I`ve managed to apply gravity, it will fall down, but now the whole logic when jumping on tiles et cetera is catching up. The thing is, when I collide, i update the current Y axis to the player, but when i jump into a tile which is higher, i automatically get on top of it.. Kind of annoying, so if anyone is kind enough to help me out.. How do I apply physics in a game that works?