View Single Post
  #6  
Old 04-23-2009, 11:08 AM
Moh200jo Moh200jo is offline
Member
 
Join Date: Feb 2009
Posts: 99
I have tried with the following code; does not work
HTML Code:
import viz

viz.go()

viz.add('tut_ground.wrl')
#Add the ground and an avatar.
avatar = viz.addAvatar( 'vcc_female.cfg' )
ball=viz.add('ball.wrl')
ball.setPosition(0,0.1,9)
ball.collideSphere()
ball.enable(viz.COLLIDE_NOTIFY)
walk=vizact.walkTo([0,0,8.99])
avatar.addAction(walk)
boneCollide = viz.addGroup()
boneCollide.collideBox([.5,.1,.5])
foot=avatar.getBone('Bip01 R Foot')
boneCollide.setPosition(foot.getPosition(viz.AVATAR_WORLD))
boneCollide.setQuat(foot.getQuat(viz.AVATAR_WORLD))
nodes = viz.phys.intersectNode(boneCollide)
for n in nodes:
    print 'bone collided with',n
Reply With Quote