<?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/4855" />

	<title>Real-Time Physics Simulation Forum</title>
	
	<link href="https://pybullet.org/Bullet/phpBB3/index.php" />
	<updated>2010-03-17T10:11:53+00:00</updated>

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

		<entry>
		<author><name><![CDATA[ebingol]]></name></author>
		<updated>2010-03-17T10:11:53+00:00</updated>

		<published>2010-03-17T10:11:53+00:00</published>
		<id>https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=17895#p17895</id>
		<link href="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=17895#p17895"/>
		<title type="html"><![CDATA[position prediction]]></title>

		
		<content type="html" xml:base="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=17895#p17895"><![CDATA[
It is my first post here so i might be doing something wrong.<br><br>So i am trying to solve a future position of a ball(sphere).<br>I went through the bullets source code and try to solve for new position<br>I am assuming there is no collusion with any objects<br>The only force I have is the gravity and a force which is added to the current velocity<br>( i used  applyCentralImpulse for pushing this ball or kicking to be more accurate)<br>I dont really care about y axis. (gravity applies to y) <br><br>by the time I run this code the ball has some linearavelocity.<br><br>I am not worried orientation, well it is a ball. <br><br>Here is the code:<div class="codebox"><p>Code: </p><pre><code>// I tried to get the totalForce() but it does not have the gravity included in it// total force always returns a zero vectorbtVector3 gravityForce = btVector3(0,-10.0f,0) * btScalar(1.0)/m_pBody-&gt;getInvMass()* m_pBody-&gt;getLinearFactor() * time;btVector3  forceAddedVel = m_pBody-&gt;getLinearVelocity()+ gravityForce;// The new damping functionsbtVector3  damped=forceAddedVel * btPow(btScalar(1.0) - m_pBody-&gt;getLinearDamping(),time); //the predicted position is the balls position plus these two termsFuturePosition=getPosition() + (damped) * time;</code></pre></div>Is this the right way to do this. Any help would be great.<p>Statistics: Posted by <a href="https://pybullet.org/Bullet/phpBB3/memberlist.php?mode=viewprofile&amp;u=6466">ebingol</a> — Wed Mar 17, 2010 10:11 am</p><hr />
]]></content>
	</entry>
	</feed>
