![]() |
|
#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 08:39 AM |
| Collision detection with specific models | just alex | Vizard | 1 | 02-06-2009 12:02 PM |
| Collision with child nodes | rubberpimple | Vizard | 4 | 09-17-2008 05:27 PM |
| Collision detection with haptic pen | mjabon | Vizard | 3 | 01-17-2008 07:35 PM |
| collision events trigger | Eunice | Vizard | 1 | 01-03-2006 11:39 AM |