Hello everyone, I’ve decided to give to you the code for my player class which I used in my portal 2d project, this is the character without the gun and teleports, there are several functions I’ve added to hopefully make it easier to use, such as the character movement is handled by Player:move(x,y). It’s quite messy code, I apologise but hopefully its fairly easy to integrate, it needs a global called scr which is the translation of the screen. If not used, set it to vec2().
The class includes a joystick which controls the players movement, you’ll need to add your own button to make him jump if you wish, this can be done using the y value in the Player:move(x,y) function, around 2000 is a good mark.
Here’s the old code and an example: http://pastebin.com/VWXMmAdz
Video of new ragdoll: http://www.youtube.com/watch?v=oPZmmdrjjUk