WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 09-12-2006, 11:57 AM
hotspur1 hotspur1 is offline
Member
 
Join Date: Mar 2003
Location: Cambridge, MA
Posts: 54
Collision detection between objects

I'd like to detect when two objects collide so they stick together (e.g., robot hand grabs object). With v2.53 I've been using the following

<node3d-1>.collidemesh()
<node3d-1>.collidingwith(<node3d-2>,0) # This returned a 1 if meshes intersected.

I see that the syntax has changed slightly to collideMesh, is the collidingwith method still included in v3? Or is there a new way to do this?

Thanks
Reply With Quote
  #2  
Old 09-12-2006, 12:02 PM
farshizzo farshizzo is offline
WorldViz Team Member
 
Join Date: Mar 2003
Posts: 2,849
The current Beta version of 3.0 does not implement the collidingwith function. However, there is still a way to detect whether two nodes are colliding. The viz.phys.intersectNode() function will return a list of all the nodes that a node is currently colliding with. Example:
Code:
if node2 in viz.phys.intersectNode(node1):
    print 'Node 1 is colliding with Node 2'
Reply With Quote
  #3  
Old 09-12-2006, 12:29 PM
hotspur1 hotspur1 is offline
Member
 
Join Date: Mar 2003
Location: Cambridge, MA
Posts: 54
Great - that did the trick - thanks.
Reply With Quote
  #4  
Old 12-02-2006, 10:42 AM
giancamati giancamati is offline
Member
 
Join Date: Jun 2006
Posts: 27
Talking document

Where can I find a document explaining all these changes?

g.a.
Reply With Quote
  #5  
Old 12-05-2006, 12:17 PM
Gladsomebeast Gladsomebeast is offline
Member
 
Join Date: Mar 2005
Location: Isla Vizta, CA
Posts: 397
We are still working on the documentation. You can always look at the source, aka the viz.py file.
__________________
Paul Elliott
WorldViz LLC
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


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


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