View Single Post
Old 09-17-2008, 04:27 PM
farshizzo farshizzo is offline
WorldViz Team Member
Join Date: Mar 2003
Posts: 2,849
I don't have a fully working example to show you, but the concept is very simple. First create an empty group node and define a collision shape that matches the bone you are interested in:
boneCollide = viz.addGroup()
Then when you want to check for collisions with the bone, just get the position of the bone in world coordinates and update the boneCollide object with it:

#Perform collision detection
nodes = viz.phys.intersectNode(boneCollide)
for n in nodes:
    print 'bone collided with',n
Does this help you?
Reply With Quote