Do you know the problem of "stepSimulation"

g6785654
Posts: 7
Joined: Tue Sep 04, 2012 1:55 am

Do you know the problem of "stepSimulation"

Post by g6785654 »

I designed a program whitch uses it to test the "stepSimulation",everytime I click mouse left,then touch of the "stepSimulation",if I click fast,the dynamic word will lose efficacy,the codes as following:

Code: Select all

bool mousePressed(const OIS::MouseEvent &arg,OIS::MouseButtonID id)
	{
		if(id == OIS::MB_Left)
		{
			flag = true;
			flag1 = false;
		}
		if(id == OIS::MB_Right)
		{
			flag1 = true;
			flag = false;
		}
		return true;

	}

if(flag)
{
		World->stepSimulation(1.f/60.f,10);	
g6785654
Posts: 7
Joined: Tue Sep 04, 2012 1:55 am

Re: Do you know the problem of "stepSimulation"

Post by g6785654 »

Code: Select all

bool frameStarted(const FrameEvent& evt)
	{
		showDebugOverlay(false);
		mMouse->capture();
		if(flag)
		{
			World->stepSimulation(1.f/60.f,10);	
I use bullet in Ogre,the stepSimulation in frameStarted
khoowaikeong
Posts: 43
Joined: Fri Jun 15, 2012 7:11 am

Re: Do you know the problem of "stepSimulation"

Post by khoowaikeong »

i did note that it seem to ignore the step time when it is interpolating the result using it's internal time, but it is rarely a problem, i can create bullet time style effect as long as I don't change the frequency of the step without smoothing it, i am also planning to replace my game engine timer with the one in bullet for more consistency.

anyone have more info on the characteristic of bullet's time step?