Sep 13, 2011 at 11:10 AM
Edited Sep 13, 2011 at 11:11 AM
Hi guys, im currently running into 3 problems with a platformer game im making.
1) I've created vertical moving platforms with dynamic bodies and fixed prismatic joints which works great, however if i make 2 directly next to each other, they sometimes get stuck on each other and either stop working or go out of time etc etc. I've tried
messing about with their collision groups but it doesn't seem to be doing anything.
2) Another problem with the vertical platforms is that the weight of the player jumping onto the platform moves it down a tiny bit. I've tried messing about with the mass of both platforms and player and any other variables i thought might be the cause but
nothing is working.
3) The player (made up of the usual ball and rectangle) has the ability to crouch which is done by removing the rectangle shape and replacing it with a square (the opposite happening when they stop crouching).
if (crouched && !lastCrouched)
rj.LocalAnchorA = new Vector2(0, 0.48f);
moveSpeed = crouchSpeed;
In the game i have a low roof that you're meant to crouch under however if the player has touched the wall with the big rectangle before hand, it still seems to think that the body is a rectangle rather than square... Hard to explain, hopefully the pictures
will explain better.
Crouch working: http://bit.ly/nTDJRY
Contact made as rectangle: http://bit.ly/rspDBu
Crouch not working: http://bit.ly/nIJSC9
I was looking for a way to clear the ContactList, but it seems to be get only.
Hopefully they're just simple problems that im over looking, but any help would be appreciated.