#1
|
|||
|
|||
Collision notifications
I'm using the collision notification mechanism in Vizard, and I want to detect if one object collides with another and apply a force if that happens. But the problem is I can't identify the object. For example, let's say I have an object called "ball", and a object called "racket" already defined and loaded previously on the script, and with the viz.COLLIDE_NOTIFY flag enabled. Then I define the collide notification function:
Code:
def collideNot(e): if e.obj1 == ball or e.obj2 == ball: print "collision" else: print "no collision" |
Thread Tools | |
Display Modes | Rate This Thread |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Collision detection | Moh200jo | Vizard | 1 | 01-27-2010 07:39 AM |
Collision detection with specific models | just alex | Vizard | 1 | 02-06-2009 11:02 AM |
Collision with child nodes | rubberpimple | Vizard | 4 | 09-17-2008 04:27 PM |
Collision detection with haptic pen | mjabon | Vizard | 3 | 01-17-2008 06:35 PM |
collision events trigger | Eunice | Vizard | 1 | 01-03-2006 10:39 AM |