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

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

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

		<entry>
		<author><name><![CDATA[daBrado]]></name></author>
		<updated>2006-11-12T10:12:17+00:00</updated>

		<published>2006-11-12T10:12:17+00:00</published>
		<id>https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=2405#p2405</id>
		<link href="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=2405#p2405"/>
		<title type="html"><![CDATA[Re: Proper way to force positions and rotations? (kinematic)]]></title>

		
		<content type="html" xml:base="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=2405#p2405"><![CDATA[
<blockquote class="uncited"><div>A paddle is a kinematic/animated object. <br><br>Bullet has support for that by creating a static object, and setting its collisionflags as kinematic, and disable deactivation</div></blockquote>Ideally, I'd like to move the paddle around by changing its velocity to move towards a target position.  However, I can't set the velocity of a static object, even if kinematic.<br><br>Must I manually calculate the transforms along the desired path of the paddle, i.e. do velocity transformations manually....?  If so, why?<br><blockquote class="uncited"><div>Recommended is to use a btMotionState derived class, then Bullet will get the kinematic transform from the motionstate each frame and derive linear/angular velocity for the kinematic animated object, so it interacts properly (one-way) with dynamic rigidbodies.</div></blockquote>I'm afraid I don't understand what you mean by this.  Are you talking about a btMotionState on the paddle...?  A static kinematic object can set its linear/angular velocity implicitly via the motion state, but I cannot set them explicitly via setLinearVelocity() and setAngularVelocity() ?<br><br>Thanks for any help,<br>  Braden<p>Statistics: Posted by <a href="https://pybullet.org/Bullet/phpBB3/memberlist.php?mode=viewprofile&amp;u=974">daBrado</a> — Sun Nov 12, 2006 10:12 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Erwin Coumans]]></name></author>
		<updated>2006-11-12T04:50:06+00:00</updated>

		<published>2006-11-12T04:50:06+00:00</published>
		<id>https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=2402#p2402</id>
		<link href="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=2402#p2402"/>
		<title type="html"><![CDATA[Re: Proper way to force positions and rotations? (kinematic)]]></title>

		
		<content type="html" xml:base="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=2402#p2402"><![CDATA[
A paddle is a kinematic/animated object. <br><br>Bullet has support for that by creating a static object, and setting its collisionflags as kinematic, and disable deactivation(sleep):<div class="codebox"><p>Code: </p><pre><code>body-&gt;setCollisionFlags( body-&gt;getCollisionFlags() | btCollisionObject::CF_KINEMATIC_OBJECT);body-&gt;setActivationState(DISABLE_DEACTIVATION);</code></pre></div>See CcdPhysicsDemo for an example: enable USE_KINEMATIC_GROUND and see the ground move, while the stack of cylinders gets moved by it.<br><br>Recommended is to use a btMotionState derived class, then Bullet will get the kinematic transform from the motionstate each frame and derive linear/angular velocity for the kinematic animated object, so it interacts properly (one-way) with dynamic rigidbodies.<br><br><br><blockquote class="uncited"><div>Hi,<br><br>I was curious, what is the proper way to force the position and/or rotation of a rigid body?<br><br>For example, let's imagine a game of 3d pong.  So, let's say I have a computer controlled paddle that tracks and strikes a ball.  But, I don't want the paddle to start rotating once it strikes the ball.  I want to keep the paddle always at the same rotation.  Should I be manually setting its worldTransform to the proper rotation?  Or should I use a constraint, and lock the paddle's rotation degrees of freedom?  Or is there another option?<br><br>Also, let's say the ball should be reset to a home position if it misses the paddle and goes out of bounds.  Should I reset its position via btRigidBody-&gt;setWorldTransform()?  Or though its btMotionState-&gt;setWorldTransform()?  Or something else?  In other words, what is the best way to "teleport" an object to another location, without bullet trying to interpolate the path or assign a velocity to the body, etc?<br><br>Thanks for any help,<br>  Braden</div></blockquote><p>Statistics: Posted by <a href="https://pybullet.org/Bullet/phpBB3/memberlist.php?mode=viewprofile&amp;u=2">Erwin Coumans</a> — Sun Nov 12, 2006 4:50 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[daBrado]]></name></author>
		<updated>2006-11-12T04:06:37+00:00</updated>

		<published>2006-11-12T04:06:37+00:00</published>
		<id>https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=2401#p2401</id>
		<link href="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=2401#p2401"/>
		<title type="html"><![CDATA[Proper way to force positions and rotations?]]></title>

		
		<content type="html" xml:base="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=2401#p2401"><![CDATA[
Hi,<br><br>I was curious, what is the proper way to force the position and/or rotation of a rigid body?<br><br>For example, let's imagine a game of 3d pong.  So, let's say I have a computer controlled paddle that tracks and strikes a ball.  But, I don't want the paddle to start rotating once it strikes the ball.  I want to keep the paddle always at the same rotation.  Should I be manually setting its worldTransform to the proper rotation?  Or should I use a constraint, and lock the paddle's rotation degrees of freedom?  Or is there another option?<br><br>Also, let's say the ball should be reset to a home position if it misses the paddle and goes out of bounds.  Should I reset its position via btRigidBody-&gt;setWorldTransform()?  Or though its btMotionState-&gt;setWorldTransform()?  Or something else?  In other words, what is the best way to "teleport" an object to another location, without bullet trying to interpolate the path or assign a velocity to the body, etc?<br><br>Thanks for any help,<br>  Braden<p>Statistics: Posted by <a href="https://pybullet.org/Bullet/phpBB3/memberlist.php?mode=viewprofile&amp;u=974">daBrado</a> — Sun Nov 12, 2006 4:06 am</p><hr />
]]></content>
	</entry>
	</feed>
