I am trying to implement a gun using Bullet Physics and i need to detect if the bullets collide with another player so that I can decrease the other players health.
I can get the BulletRigidBodyNode’s that a bullet collides with as follows:
results = self.world.contactTest(projectile.node()) for contact in results.getContacts(): print contact.getNode0() print contact.getNode1()
When a bullet rigid body is created it can be assigned a name:
self.thisPlayer = BulletRigidBodyNode('Player')
Is there a way of getting the name from a BulletRigidBodyNode ?