WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 08-29-2008, 04:43 PM
rubberpimple rubberpimple is offline
Member
 
Join Date: Jan 2008
Location: Phoenix, Arizona
Posts: 16
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
Reply With Quote
  #2  
Old 04-23-2009, 07:44 AM
Moh200jo Moh200jo is offline
Member
 
Join Date: Feb 2009
Posts: 99
Quote:
Originally Posted by rubberpimple View Post
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?
Hi David,
Have you got the code of bone collision?
Thanks in advance.
Reply With Quote
  #3  
Old 04-23-2009, 10:26 AM
Jeff Jeff is offline
WorldViz Team Member
 
Join Date: Aug 2008
Posts: 2,471
Here's the thread that has a response to this question
Reply With Quote
  #4  
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
  #5  
Old 04-23-2009, 12:18 PM
Jeff Jeff is offline
WorldViz Team Member
 
Join Date: Aug 2008
Posts: 2,471
If you want to have collisions with the avatar's foot I think the code that Farshizzo posted in this thread will help. In that example a collision box is linked to an avatar's hand.
Reply With Quote
Reply

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Collision detection with haptic pen mjabon Vizard 3 01-17-2008 06:35 PM
collision detection? Colin Vizard 5 05-16-2007 04:52 PM
problem with collision detection paulpars Vizard 6 06-09-2006 06:03 PM
Walking avatars --> collision detection? sjroorda Vizard 3 10-13-2005 04:47 AM
Collision Detection for Hierarchies of Objects vjosh Vizard 1 04-15-2005 05:46 PM


All times are GMT -7. The time now is 07:55 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
Copyright 2002-2023 WorldViz LLC