WorldViz User Forum

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

Moh200jo 01-26-2010 11:34 AM

Collision detection
 
Hi
I’ve got a strange problem in the following code:

Code:

foot1=viz.add('Foot.ive',  scale = [.05,.05,.05])
foot=viz.add('Foot.ive',  scale = [.05,.05,.05])
foot1.collideBox(.005,.005,.005)
foot1.disable(viz.DYNAMICS)
foot1.enable(viz.COLLIDE_NOTIFY)
foot.collideBox(.05,.005,.05)
foot.disable(viz.DYNAMICS)
foot.enable(viz.COLLIDE_NOTIFY)
 
def onCollideBegin(e):
  if box in viz.phys.intersectNode(foot1):
  print "Yes you touched the box by foot1"
 if box in viz.phys.intersectNode(foot):
        print "Yes you touched the box by foot1"
viz.callback(viz.COLLIDE_BEGIN_EVENT,onCollideBegin)

The problem is that the collision detection function can detect the collision with foot and could not detect the collision with the other foot
Is there anybody can advice where is my problem?
Thanks,
Moh

GiudiceLab 01-27-2010 07:39 AM

Your collide box dimensions with one foot are much smaller than with the other. Could that be the problem?


All times are GMT -7. The time now is 11:35 PM.

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