WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 11-30-2009, 04:49 AM
Mai Mai is offline
Member
 
Join Date: Apr 2009
Posts: 5
Hand's Collision

I am using the following object to touch balloons (as an example)
Code:
hand=viz.add('hand.cfg')
to enable the collision I have used the following code:
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)
but it does not work
any help would be appreciated
Reply With Quote
  #2  
Old 12-08-2009, 04:35 PM
Jeff Jeff is offline
WorldViz Team Member
 
Join Date: Aug 2008
Posts: 2,471
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.
Reply With Quote
Reply

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Collision detection with specific models just alex Vizard 1 02-06-2009 11:02 AM
Collision Detection and Nearest Point to Probe xabbu Vizard 2 01-06-2009 03:01 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


All times are GMT -7. The time now is 07:53 AM.


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