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

	<title>Real-Time Physics Simulation Forum</title>
	
	<link href="https://pybullet.org/Bullet/phpBB3/index.php" />
	<updated>2014-01-03T19:34:00+00:00</updated>

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

		<entry>
		<author><name><![CDATA[simejanko]]></name></author>
		<updated>2014-01-03T19:34:00+00:00</updated>

		<published>2014-01-03T19:34:00+00:00</published>
		<id>https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=32518#p32518</id>
		<link href="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=32518#p32518"/>
		<title type="html"><![CDATA[ghost object doesnt detect collisions with kinematic objects]]></title>

		
		<content type="html" xml:base="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=32518#p32518"><![CDATA[
Hello! I am using jbullet, java port of bullet and i cant get my ghost object to detect collision with kinematic objects. The fact that it is a java port shouldnt matter too much since ive been working with c++ documentation all this time and didnt have any problem.<br><br>This is how i set up my ghost object:<div class="codebox"><p>Code: </p><pre><code>        CollisionShape ghostShape = new BoxShape(new Vector3f(0.2f,0.3f,0.2f));ghostObject = new GhostObject();ghostObject.setCollisionShape(ghostShape);ghostObject.setWorldTransform(new Transform(new Matrix4f(                            new Quat4f(0, 0, 0, 1),                            new Vector3f(1000, 401, 1000), 1.0f)));        dynamicsWorld.addCollisionObject(ghostObject);        dynamicsWorld.getBroadphase().getOverlappingPairCache().setInternalGhostPairCallback(new GhostPairCallback());dynamicsWorld.setInternalTickCallback(new InternalTickCallback() {        @Overridepublic void internalTick(DynamicsWorld world, float timeStep) {for(int i=0;i&lt;playerGhostObject.getNumOverlappingObjects();i++){RigidBody body = (RigidBody) playerGhostObject.getOverlappingObject(i);if(body.isKinematicObject()){System.out.println("Game over!");}                        System.out.println("Collision");}}}, this);</code></pre></div>If i leave collision flags of an object that collides with ghost object unchanged (dynamic) or set it to static , the collision is detected.<br>Tried both <div class="codebox"><p>Code: </p><pre><code>santa.setCollisionFlags(santa.getCollisionFlags() | CollisionFlags.KINEMATIC_OBJECT);</code></pre></div>and<div class="codebox"><p>Code: </p><pre><code>santa.setCollisionFlags(CollisionFlags.KINEMATIC_OBJECT);</code></pre></div>I also disabled deactivation on my kinematic object.<p>Statistics: Posted by <a href="https://pybullet.org/Bullet/phpBB3/memberlist.php?mode=viewprofile&amp;u=10637">simejanko</a> — Fri Jan 03, 2014 7:34 pm</p><hr />
]]></content>
	</entry>
	</feed>
