![]() |
#1
|
|||
|
|||
Hand's Collision
I am using the following object to touch balloons (as an example)
Code:
hand=viz.add('hand.cfg') Code:
handballoon = viz.add('balloon.ive',scale=[0.01,0.01,0.01]) handballoon.collideSphere() handballoon.disable(viz.DYNAMICS) handballoon.enable(viz.COLLIDE_NOTIFY) handballoon_link= viz.link( hand , handballoon ) handballoon_link.preTrans([0.07,-0.07,0]) def onCollideBegin(e): if e.obj1 == handballoon: if e.obj2==balloon: print 'Yes Balloon has been touched :',e.obj2 viz.callback(viz.COLLIDE_BEGIN_EVENT,onCollideBegin) any help would be appreciated |
#2
|
|||
|
|||
You need to have the physics engine enabled to detect collisions. Vizard uses the ODE physics engine and it can have problems computing collisions for very small objects. Since your balloon is scaled down to a small size this may be the case if you have enabled physics elsewhere in your script.
|
![]() |
Thread Tools | |
Display Modes | Rate This Thread |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Collision detection with specific models | just alex | Vizard | 1 | 02-06-2009 12:02 PM |
Collision Detection and Nearest Point to Probe | xabbu | Vizard | 2 | 01-06-2009 04:01 AM |
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 |