PDA

View Full Version : Collide


roobert
07-28-2014, 12:37 PM
as I can generate an action after the collision of two models

mod1=viz.add('ball.wrl')
mod1.collideMesh()

mod2=viz.add('ball.wrl')
mod2.collideMesh()

if mod1 collide with mod2:
print "collision exists"

Jeff
07-28-2014, 09:26 PM
The Callbacks and Complex Shapes (http://docs.worldviz.com/vizard/#Callbacks_and_Complex_Shapes.htm) tutorial shows how to handle collision events when using physics. In the callback function for the collision event you can call the action.