{"action":"opened","issue":{"url":"https://api.github.com/repos/jMonkeyEngine/jmonkeyengine/issues/390","labels_url":"https://api.github.com/repos/jMonkeyEngine/jmonkeyengine/issues/390/labels{/name}","comments_url":"https://api.github.com/repos/jMonkeyEngine/jmonkeyengine/issues/390/comments","events_url":"https://api.github.com/repos/jMonkeyEngine/jmonkeyengine/issues/390/events","html_url":"https://github.com/jMonkeyEngine/jmonkeyengine/issues/390","id":122748554,"number":390,"title":"Simple JBullet collision of two Nodes / Geometries","user":{"login":"dmdm22","id":11841370,"avatar_url":"https://avatars.githubusercontent.com/u/11841370?v=3","gravatar_id":"","url":"https://api.github.com/users/dmdm22","html_url":"https://github.com/dmdm22","followers_url":"https://api.github.com/users/dmdm22/followers","following_url":"https://api.github.com/users/dmdm22/following{/other_user}","gists_url":"https://api.github.com/users/dmdm22/gists{/gist_id}","starred_url":"https://api.github.com/users/dmdm22/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dmdm22/subscriptions","organizations_url":"https://api.github.com/users/dmdm22/orgs","repos_url":"https://api.github.com/users/dmdm22/repos","events_url":"https://api.github.com/users/dmdm22/events{/privacy}","received_events_url":"https://api.github.com/users/dmdm22/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-12-17T14:48:01Z","updated_at":"2015-12-17T14:48:01Z","closed_at":null,"body":"With jme 3.1 collision has stopped working and i just cannot find the right changes to adapt.\r\nHere my collision method which worked flawlesssly until 3.1. The addCollisionObject method seems to have changed, but i have no idea where to get a com.bulletphysics.collision.dispatch.CollisionObject from?\r\n\r\n```java\r\npublic boolean collideDirect(Node node_1, Geometry geom_1, Node node_2, Geometry geom_2)\r\n\t{\r\n\t\tinitCollsionDetection(false);\r\n\r\n\t\tCollisionShape shape_1 = CollisionShapeFactory.createDynamicMeshShape(geom_1);\r\n\t\tCollisionShape shape_2 = CollisionShapeFactory.createDynamicMeshShape(geom_2);\r\n\r\n\t\tPhysicsRigidBody body_1 = new PhysicsRigidBody(shape_1);\r\n\t\tPhysicsRigidBody body_2 = new PhysicsRigidBody(shape_2);\r\n\r\n\t\tbody_1.setPhysicsLocation(node_1.getWorldTranslation());\r\n\t\tbody_1.setPhysicsRotation(node_1.getWorldRotation());\r\n\r\n\t\tbody_2.setPhysicsLocation(node_2.getWorldTranslation());\r\n\t\tbody_2.setPhysicsRotation(node_2.getWorldRotation());\r\n\r\n\t\tthis.collision_world.addCollisionObject(body_1.getObjectId());\r\n\t\tthis.collision_world.addCollisionObject(body_2.getObjectId());\r\n\r\n\t\tCollisionAlgorithm algo = this.collision_world.getDispatcher().findAlgorithm(body_1.getObjectId(),\r\n\t\t\t\tbody_2.getObjectId());\r\n\t\tManifoldResult contact_point_result = new ManifoldResult(body_1.getObjectId(), body_2.getObjectId());\r\n\t\talgo.processCollision(body_1.getObjectId(), body_2.getObjectId(), this.collision_world.getDispatchInfo(),\r\n\t\t\t\tcontact_point_result);\r\n\r\n\t\tboolean collide = false;\r\n\r\n\t\tObjectArrayList<PersistentManifold> manifolds = new ObjectArrayList<PersistentManifold>();\r\n\t\talgo.getAllContactManifolds(manifolds);\r\n\r\n\t\tfor (PersistentManifold manifold : manifolds)\r\n\t\t{\r\n\t\t\tint num_contacts = manifold.getNumContacts();\r\n\t\t\tif (num_contacts > 0)\r\n\t\t\t{\r\n\t\t\t\tcollide = true;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tthis.collision_world.removeCollisionObject(body_1.getObjectId());\r\n\t\tthis.collision_world.removeCollisionObject(body_2.getObjectId());\r\n\r\n\t\treturn collide;\r\n\t}\r\n```\r\n\r\nMaybe there is a better way to do this, what i need is a simple method that tells if two nodes collide with each other, but accurate collision based on meshes not on bounding boxes. Any ideas?"}}