How can i make a ladder with box2d and the Corona sdk

Hi fellow developers,

I have been struggling for some days now trying to make a ladder. I check for collision and when I am on the ladder I run a function that contains this

1
2
3
4
5
6
if joystick.joyY ~= false and ladder ~= false then
        if joystick.joyAngle > 325 or joystick.joyAngle < 25 then
                player.y = player.y + joystick.joyY * ySpeed
                player:applyForce( 0, -250, player.x, player.y )
        end
end
views:2649 update:2012/2/7 8:40:54
corona forums © 2003-2011