How to attaching a Bullet collision shape to a Joint ?

...
self.BulletBody = BulletRigidBodyNode('Body-'+name)
...
np = self.avatar.exposeJoint(None,"modelRoot","hips").attachNewNode(self.BulletBody)
...
BulletHand = BulletRigidBodyNode('Hand.L-'+name)
...
np = self.avatar.exposeJoint(None,"modelRoot","hand.L").attachNewNode(BulletHand)
...
BulletHand = BulletRigidBodyNode('Hand.L-'+name)
...
np = self.avatar.exposeJoint(None,"modelRoot","hand.R").attachNewNode(BulletHand)

hand attaching to ‘hand.l’ and ‘hand.r’, body attaching to hips.

When two body collide with each other, it very well. But befor hand collide body, code will be detected collision.

When body with hand great distance away, it still can’t detected collision, so it must be calculated position error.

I am sorry, but I can’t understand what exactly the problem description is. Can you maybe wrap this game up and provide a download somewhere. Maybe I find something when running it myself.

A random guess would be that you mixed up something when setting up collision masks.

panda3d.noie.name/downloads/game20120920.tar.gz

It include two .py file, game.py and ku_fei.py.

There are have two contarTest function, They are in the game.py and ku_fei.py. Function contartTest in the game.py call contartTest in the ku_fei.py.

def contartTest(self):
	result = base.world.contactTest(self.BulletBody)
	for contact in result.getContacts():
		# 如果碰到身体
		# Body collide each other
		if contact.getNode1().getName()[:4]=="Body": 
			self.request('Bodycollide')
		# 碰到的不是自己
		# Body collide hand and the hand not own.
		elif contact.getNode1().getName()[:4]=="Hand" and contact.getNode1().getName()[7:9]!=self.name:
			self.request('Beaten')