Help With Gravity & A Jump Function?(75% done vol jump :D)
Posted: Mon Nov 05, 2012 1:17 am
I made some basic collision detection, however, it's vary buggy... If anyone can help? Great! The way it works is it loads a collision map, black and white. Then, checks for every block if the player collides top, bottom, left, or right. I use a one pixel padding for detection. The core of it is in col.lua. You can look at the other code to if you want. It's all nicely documented.
The bugs are:
If i set the gravity(variable grav in player.lua) any higher, then the player falls into the block making it unable to move... :S
The above problem is what is getting me stuck, and stooping me form making my jump function... I also, would like to know if someone could help me make
a jump function "realistic" (meaning applies physics).
Also, sorry for being a dick and blocking out all the graphics... You can use the code tho
TheP3
The bugs are:
If i set the gravity(variable grav in player.lua) any higher, then the player falls into the block making it unable to move... :S
The above problem is what is getting me stuck, and stooping me form making my jump function... I also, would like to know if someone could help me make
a jump function "realistic" (meaning applies physics).
Also, sorry for being a dick and blocking out all the graphics... You can use the code tho
TheP3