Collision Response Animator Jump Height

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
vasekkraka
Posts: 11
Joined: Mon Jan 11, 2016 7:17 am

Collision Response Animator Jump Height

Post 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?
CuteAlien
Admin
Posts: 9670
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Re: Collision Response Animator Jump Height

Post 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.
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Post Reply