WorldViz User Forum

WorldViz User Forum (https://forum.worldviz.com/index.php)
-   Vizard (https://forum.worldviz.com/forumdisplay.php?f=17)
-   -   Collision detection between objects (https://forum.worldviz.com/showthread.php?t=732)

hotspur1 09-12-2006 10:57 AM

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

.collidemesh()
.collidingwith(,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

farshizzo 09-12-2006 11:02 AM

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'


hotspur1 09-12-2006 11:29 AM

Great - that did the trick - thanks.

giancamati 12-02-2006 09:42 AM

document
 
Where can I find a document explaining all these changes?

g.a.

Gladsomebeast 12-05-2006 11:17 AM

We are still working on the documentation. You can always look at the source, aka the viz.py file.


All times are GMT -7. The time now is 04:26 PM.

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