Hey Guys,
I've been testing my app with lower update speeds, and everything seems to be working fine except for my character's jump height. To jump, first I set the y velocity to 0, and then apply an impulse in the y direction. At lower frame rates (I just threw a sleep(100) in my main loop to test) the character doesn't jump as high... probably a little less than half the height he normally does.
I'm not quite sure what could be causing the impulse to have a lesser effect on the body at slower frame rates. Any thoughts to what I should be checking? I've already verified that my gravity isn't greater at lower frame rates, and I'm pretty confident that's the only force being applied in the y direction.
Also, my implementation of my updating my physics is very similar to: http://www.unagames.com/blog/daniele/20 ... tion-box2d . My gravity is being applied at the same time the "updateControllers_" is called, and my jump impulse is applied in my keyboard callback function.
Any advice is welcome, thanks in advance.
-Dave
I've been testing my app with lower update speeds, and everything seems to be working fine except for my character's jump height. To jump, first I set the y velocity to 0, and then apply an impulse in the y direction. At lower frame rates (I just threw a sleep(100) in my main loop to test) the character doesn't jump as high... probably a little less than half the height he normally does.
I'm not quite sure what could be causing the impulse to have a lesser effect on the body at slower frame rates. Any thoughts to what I should be checking? I've already verified that my gravity isn't greater at lower frame rates, and I'm pretty confident that's the only force being applied in the y direction.
Also, my implementation of my updating my physics is very similar to: http://www.unagames.com/blog/daniele/20 ... tion-box2d . My gravity is being applied at the same time the "updateControllers_" is called, and my jump impulse is applied in my keyboard callback function.
Any advice is welcome, thanks in advance.
-Dave