Collision Response Animator Jump Height
Posted: Sun Mar 13, 2016 12:58 pm
Hi,
i have maybe simple question. In my project I using little modifided ResponseAnimator. But Jump method is original.
In rendering loop i have FPS limiting wait,
req_fps in code is defined constant. My problem with jumping is in height of jump.
For example when i set required fps to 50, height of jump is around 300. (Y coord is increased by 300 in highest point)
but when i set required fps to 500, height of jump is around 700. (Y coord is increased by 700 in highest point).
Someone knows whats doing wrong?
i have maybe simple question. In my project I using little modifided ResponseAnimator. But Jump method is original.
In rendering loop i have FPS limiting wait,
Code: Select all
while(dev->run())
{
dev->getTimer()->tick();
u32 old_time = dev->getTimer()->getTime();
driver->beginScene(true, true, SColor(255,120,120,120));
smgr->drawAll();
guienv->drawAll();
driver->endScene();
if (dev->getTimer()->getTime() - fps_time > 1000)
{
u32 diff = dev->getTimer()->getTime() - old_time;
f32 wait = (1000 / req_fps) - diff;
dev->sleep(wait);
}
For example when i set required fps to 50, height of jump is around 300. (Y coord is increased by 300 in highest point)
but when i set required fps to 500, height of jump is around 700. (Y coord is increased by 700 in highest point).
Someone knows whats doing wrong?