WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

 
 
Thread Tools Rating: Thread Rating: 4 votes, 5.00 average. Display Modes
Prev Previous Post   Next Post Next
  #5  
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:
Code:
boneCollide = viz.addGroup()
boneCollide.collideBox([0.1,0.1,0.2])
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:
Code:
boneCollide.setPosition(bone.getPosition(viz.AVATAR_WORLD))
boneCollide.setQuat(bone.getQuat(viz.AVATAR_WORLD))

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


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
real time collision on animation path whj Vizard 10 10-06-2008 04:38 PM
Collision detection with haptic pen mjabon Vizard 3 01-17-2008 06:35 PM
Pivot points for child objects in Vizard with 3ds Max Gladsomebeast Vizard 0 09-19-2006 11:21 AM
Child Object Rotation paulgoldberg Vizard 5 09-05-2006 11:33 AM
collision events trigger Eunice Vizard 1 01-03-2006 10:39 AM


All times are GMT -7. The time now is 10:54 AM.


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