btActionInterface::update not called randomly

Post Reply
Alex
Posts: 1
Joined: Mon Apr 22, 2013 7:50 pm

btActionInterface::update not called randomly

Post by Alex »

Hello !

I try to make my own kinematic character controller and i have a problem :(
Let me explain :

I implement the btActionInterface interface and register it to the world : world->addAction(myController).
In my Ogre3d Listener : physicsManager->getWorld()->stepSimulation(evt.timeSinceLastFrame);
The update method of my implementation uses one or two convexsweeptest.

The result is ok, but there are some troubles with the call of the update method of btActionInterface.
Sometimes, the world doesn't call it. This results in jittering.

Here my logs : when "NOK frame [frameId]" appears, no call has been launched to btActionInterface::update for the frame [frameid]. The decimal at right is the evt.timeSinceLastFrame value. (VSync activated, but same problem without)
NOK frame:798 0.016000
NOK frame:800 0.017000
NOK frame:802 0.016000
NOK frame:805 0.017000
NOK frame:807 0.017000
NOK frame:811 0.016000
NOK frame:813 0.017000
NOK frame:815 0.019000
NOK frame:817 0.016000
NOK frame:819 0.017000
NOK frame:821 0.018000
NOK frame:823 0.016000
NOK frame:825 0.017000
NOK frame:827 0.018000
NOK frame:829 0.016000
NOK frame:831 0.017000
NOK frame:833 0.018000
NOK frame:836 0.016000
NOK frame:838 0.017000
NOK frame:840 0.018000
NOK frame:842 0.017000
NOK frame:844 0.017000
NOK frame:846 0.017000
NOK frame:849 0.016000
NOK frame:851 0.017000
NOK frame:855 0.017000
NOK frame:857 0.017000
NOK frame:861 0.017000
NOK frame:863 0.017000
NOK frame:865 0.017000
NOK frame:867 0.017000
NOK frame:869 0.017000
NOK frame:874 0.017000
NOK frame:876 0.017000
NOK frame:879 0.018000
NOK frame:882 0.016000
NOK frame:884 0.018000
NOK frame:886 0.017000
NOK frame:890 0.018000
NOK frame:892 0.018000
NOK frame:894 0.017000
NOK frame:898 0.018000
NOK frame:900 0.017000
NOK frame:902 0.018000
NOK frame:906 0.018000
NOK frame:908 0.018000
NOK frame:913 0.016000
NOK frame:916 0.018000
NOK frame:918 0.018000
NOK frame:922 0.017000
NOK frame:927 0.017000
NOK frame:933 0.017000
NOK frame:939 0.016000
NOK frame:943 0.019000
NOK frame:949 0.018000
NOK frame:958 0.017000
As you can see, the problem does not apply to all frames. It lasts for some 50-200 frames and comes back after 10-20 secondes.

If I set a fixed step like that : physicsManager->getWorld()->stepSimulation(1/60.0);, then no problem ! (but the frame rate must be stable in this configuration :? )
1/60 = 0.016..6 which is very similar to evt.timeSinceLastFrame.

I don't understand, help ! :cry:
I use bullet-2.81-rev2613 with OgreSDK_vc10_v1-8-1.

Thanks for helping me.
Post Reply