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

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

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

		<entry>
		<author><name><![CDATA[optime]]></name></author>
		<updated>2006-11-09T20:46:18+00:00</updated>

		<published>2006-11-09T20:46:18+00:00</published>
		<id>https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=2371#p2371</id>
		<link href="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=2371#p2371"/>
		<title type="html"><![CDATA[Sleeping/Waking callbacks]]></title>

		
		<content type="html" xml:base="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=2371#p2371"><![CDATA[
<blockquote class="uncited"><div>the btMotionState 'setWorldTransform' is only called for onWake, isn't that enough for a 'onWake' detection?</div></blockquote>It is sufficient. I would like to call functions that reset shadow caches and the like whenever an object is awaking, calling those more often is not that optimal. But you are right, I can track changes of object state in the app myself this way. Thanks once again.<br><blockquote class="uncited"><div>I can add virtual deactivation method in btMotionState that you can override to do things for objects that fall asleep (or even disable the sleeping for another frame).</div></blockquote>This would be very useful!<p>Statistics: Posted by <a href="https://pybullet.org/Bullet/phpBB3/memberlist.php?mode=viewprofile&amp;u=1115">optime</a> — Thu Nov 09, 2006 8:46 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Erwin Coumans]]></name></author>
		<updated>2006-11-09T20:34:19+00:00</updated>

		<published>2006-11-09T20:34:19+00:00</published>
		<id>https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=2370#p2370</id>
		<link href="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=2370#p2370"/>
		<title type="html"><![CDATA[Sleeping/Waking callbacks]]></title>

		
		<content type="html" xml:base="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=2370#p2370"><![CDATA[
<blockquote class="uncited"><div>Thanks for looking into this. PutToSleep is useful to me because there is a huge load on the simulation when loading a new world in game (stacked objects that are fine visually and need only to be active when they are subject to force other then gravity for example).<br><br>What about the onWake/onSleep callbacks?</div></blockquote>the btMotionState 'setWorldTransform' is only called for awake objects, isn't that enough for a 'onWake' detection?<br><br>I can add virtual deactivation method in btMotionState that you can override to do things for objects that fall asleep (or even disable the sleeping for another frame).<br><br>Is that OK?<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> — Thu Nov 09, 2006 8:34 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[optime]]></name></author>
		<updated>2006-11-09T19:47:39+00:00</updated>

		<published>2006-11-09T19:47:39+00:00</published>
		<id>https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=2369#p2369</id>
		<link href="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=2369#p2369"/>
		<title type="html"><![CDATA[Sleeping/Waking callbacks]]></title>

		
		<content type="html" xml:base="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=2369#p2369"><![CDATA[
Thanks for looking into this. PutToSleep is useful to me because there is a huge load on the simulation when loading a new world in game (stacked objects that are fine visually and need only to be active when they are subject to force other then gravity for example).<br><br>What about the onWake/onSleep callbacks?<p>Statistics: Posted by <a href="https://pybullet.org/Bullet/phpBB3/memberlist.php?mode=viewprofile&amp;u=1115">optime</a> — Thu Nov 09, 2006 7:47 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Erwin Coumans]]></name></author>
		<updated>2006-11-09T19:32:33+00:00</updated>

		<published>2006-11-09T19:32:33+00:00</published>
		<id>https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=2368#p2368</id>
		<link href="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=2368#p2368"/>
		<title type="html"><![CDATA[Re: Sleeping/Waking callbacks]]></title>

		
		<content type="html" xml:base="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=2368#p2368"><![CDATA[
You can call <div class="codebox"><p>Code: </p><pre><code>body-&gt;setActivationState(ACTIVE_TAG)</code></pre></div>to activate objects.<br><br>You can also prevent certain objects from ever falling asleep/get deactivated by calling:<div class="codebox"><p>Code: </p><pre><code>body-&gt;setActivationState(DISABLE_DEACTIVATION)</code></pre></div>btMotionState::setWorldTransform gets only called by Bullet for active objects, so your derived version of btMotionState (for example BulletC4MotionState or btDefaultMotionState) can be used to detect active objects.<br><br>There is no put-to-sleep callback yet, I'll propose some implementation.<br>Thanks,<br>Erwin<br><blockquote class="uncited"><div>Hi,<br><br>I am looking for a way to manually put btRigidBodies manually to sleep but have not found anything in the docs. Did I miss it?<br><br>Also I would like to set callbacks to be called when a btRigidBody wakes up and when it is beeing put to sleep by Bullet. I can leverage several optimizations in the graphics engine this way. Is such functionality already implemented?<br><br>Thanks!</div></blockquote><p>Statistics: Posted by <a href="https://pybullet.org/Bullet/phpBB3/memberlist.php?mode=viewprofile&amp;u=2">Erwin Coumans</a> — Thu Nov 09, 2006 7:32 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[optime]]></name></author>
		<updated>2006-11-09T19:27:45+00:00</updated>

		<published>2006-11-09T19:27:45+00:00</published>
		<id>https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=2367#p2367</id>
		<link href="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=2367#p2367"/>
		<title type="html"><![CDATA[Sleeping/Waking callbacks]]></title>

		
		<content type="html" xml:base="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=2367#p2367"><![CDATA[
Hi,<br><br>I am looking for a way to manually put btRigidBodies manually to sleep but have not found anything in the docs. Did I miss it?<br><br>Also I would like to set callbacks to be called when a btRigidBody wakes up and when it is beeing put to sleep by Bullet. I can leverage several optimizations in the graphics engine this way. Is such functionality already implemented?<br><br>Thanks!<p>Statistics: Posted by <a href="https://pybullet.org/Bullet/phpBB3/memberlist.php?mode=viewprofile&amp;u=1115">optime</a> — Thu Nov 09, 2006 7:27 pm</p><hr />
]]></content>
	</entry>
	</feed>
