<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-gb">
	<link rel="self" type="application/atom+xml" href="https://pybullet.org/Bullet/phpBB3/app.php/feed/topic/653" />

	<title>Real-Time Physics Simulation Forum</title>
	
	<link href="https://pybullet.org/Bullet/phpBB3/index.php" />
	<updated>2006-10-31T15:16:30+00:00</updated>

	<author><name><![CDATA[Real-Time Physics Simulation Forum]]></name></author>
	<id>https://pybullet.org/Bullet/phpBB3/app.php/feed/topic/653</id>

		<entry>
		<author><name><![CDATA[Erwin Coumans]]></name></author>
		<updated>2006-10-31T15:16:30+00:00</updated>

		<published>2006-10-31T15:16:30+00:00</published>
		<id>https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=2291#p2291</id>
		<link href="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=2291#p2291"/>
		<title type="html"><![CDATA[stepSimulation]]></title>

		
		<content type="html" xml:base="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=2291#p2291"><![CDATA[
<blockquote class="uncited"><div>I am new here but dt will decrease when sync calls increase - won't it?</div></blockquote>Yes, the timeStep (or dt, deltaTime) is simply 1.0 / frame_per_second.<p>Statistics: Posted by <a href="https://pybullet.org/Bullet/phpBB3/memberlist.php?mode=viewprofile&amp;u=2">Erwin Coumans</a> — Tue Oct 31, 2006 3:16 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Jack]]></name></author>
		<updated>2006-10-31T14:26:41+00:00</updated>

		<published>2006-10-31T14:26:41+00:00</published>
		<id>https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=2286#p2286</id>
		<link href="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=2286#p2286"/>
		<title type="html"><![CDATA[Re: stepSimulation]]></title>

		
		<content type="html" xml:base="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=2286#p2286"><![CDATA[
<blockquote class="uncited"><div>I found it. It was due to clamping:<br><div class="codebox"><p>Code: </p><pre><code>//clamp the number of substeps, to prevent simulation grinding spiralling down to a haltint clampedSimulationSteps = (numSimulationSubSteps &gt; maxSubSteps)? maxSubSteps : numSimulationSubSteps;</code></pre></div>At low FPS numSimulationSubSteps was clamped to default 1.</div></blockquote>btDynamicsWorld::stepSimulation has optional arguments for the maximum number of substeps and the fixed timestep:<div class="codebox"><p>Code: </p><pre><code>stepSimulation(float deltaTime, int maxNumSubSteps=1, float fixedTimeStep=1.f/60.f);</code></pre></div>You can increase the second argument, maxNumSubSteps. If the FPS increases and the deltaTime becomes ismaller then the fixed timestep, it will automatically interpolate transforms. If the number of required substeps is larger then maxNumSubSteps, it will drop physics frames, this happens when your machine cannot run the simulation fast enough. You can provide some feedback for the user, see the CcdPhysicsDemo how to determine several cases.<br><br>Erwin<p>Statistics: Posted by <a href="https://pybullet.org/Bullet/phpBB3/memberlist.php?mode=viewprofile&amp;u=772">Jack</a> — Tue Oct 31, 2006 2:26 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Erwin Coumans]]></name></author>
		<updated>2006-10-31T13:57:09+00:00</updated>

		<published>2006-10-31T13:57:09+00:00</published>
		<id>https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=2283#p2283</id>
		<link href="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=2283#p2283"/>
		<title type="html"><![CDATA[Re: stepSimulation]]></title>

		
		<content type="html" xml:base="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=2283#p2283"><![CDATA[
<blockquote class="uncited"><div><div class="codebox"><p>Code: </p><pre><code>void PHYSICS::Sync(void){const float dt = DeltaTime();LockWrite();_pPhysWorld-&gt;stepSimulation(dt);UnlockWrite();}</code></pre></div>It looks like speed of the game depends on "dt". But it must not. If FPS are going up, the speed of the flying sphere (with constant velocity) is going up too.....</div></blockquote>No, the speed of the simulation is decoupled of the timestep.<br><br>Which version of Bullet are you using? Bullet 2.19 and later has an internal fixed timestep,  separate from this 'dt'. If the dt is smaller then the fixed timestep, it will automatically interpolate, so it should be fine.<br><br>Thanks,<br>Erwin<p>Statistics: Posted by <a href="https://pybullet.org/Bullet/phpBB3/memberlist.php?mode=viewprofile&amp;u=2">Erwin Coumans</a> — Tue Oct 31, 2006 1:57 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[optime]]></name></author>
		<updated>2006-10-31T13:47:32+00:00</updated>

		<published>2006-10-31T13:47:32+00:00</published>
		<id>https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=2282#p2282</id>
		<link href="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=2282#p2282"/>
		<title type="html"><![CDATA[stepSimulation]]></title>

		
		<content type="html" xml:base="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=2282#p2282"><![CDATA[
I am new here but dt will decrease when sync calls increase - won't it?<p>Statistics: Posted by <a href="https://pybullet.org/Bullet/phpBB3/memberlist.php?mode=viewprofile&amp;u=1115">optime</a> — Tue Oct 31, 2006 1:47 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Jack]]></name></author>
		<updated>2006-10-31T11:55:44+00:00</updated>

		<published>2006-10-31T11:55:44+00:00</published>
		<id>https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=2280#p2280</id>
		<link href="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=2280#p2280"/>
		<title type="html"><![CDATA[stepSimulation]]></title>

		
		<content type="html" xml:base="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=2280#p2280"><![CDATA[
<div class="codebox"><p>Code: </p><pre><code>void PHYSICS::Sync(void){const float dt = DeltaTime();LockWrite();_pPhysWorld-&gt;stepSimulation(dt);UnlockWrite();}</code></pre></div>It looks like speed of the game depends on "dt". But it must not. If FPS are going up, the speed of the flying sphere (with constant velocity) is going up too.....<p>Statistics: Posted by <a href="https://pybullet.org/Bullet/phpBB3/memberlist.php?mode=viewprofile&amp;u=772">Jack</a> — Tue Oct 31, 2006 11:55 am</p><hr />
]]></content>
	</entry>
	</feed>
