Page 1 of 1

Collision Response Animator Jump Height

Posted: Sun Mar 13, 2016 12:58 pm
by vasekkraka
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,

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);
}
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?

Re: Collision Response Animator Jump Height

Posted: Sun Mar 13, 2016 8:15 pm
by CuteAlien
I got another report about this in the past, so I don't think you do anything wrong. Unfortunately I got half a dozen bug-reports about CollisionResponseAnimator and never found time to work on that class. You can use CollisionResponseAnimator for quick prototypes and tests. But write your own animator for real games.