![]() |
|
|
|
#1
|
|||
|
|||
|
Hi farshizzo,
I'd love to see the code for this. I'm trying to do collision detection between a hand model and specific child nodes of a parent object. Did I read somewhere that I can only do collision detection on nodes that are children of viz.WORLD?
__________________
David
|
|
#2
|
|||
|
|||
|
Quote:
Have you got the code of bone collision? Thanks in advance. |
|
#4
|
|||
|
|||
|
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
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Collision detection with haptic pen | mjabon | Vizard | 3 | 01-17-2008 07:35 PM |
| collision detection? | Colin | Vizard | 5 | 05-16-2007 05:52 PM |
| problem with collision detection | paulpars | Vizard | 6 | 06-09-2006 07:03 PM |
| Walking avatars --> collision detection? | sjroorda | Vizard | 3 | 10-13-2005 05:47 AM |
| Collision Detection for Hierarchies of Objects | vjosh | Vizard | 1 | 04-15-2005 06:46 PM |