WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 12-14-2006, 03:45 PM
giancamati giancamati is offline
Member
 
Join Date: Jun 2006
Posts: 27
Lightbulb grabbing problems.....

Hello Everybody, due to many successes with Vizard.....I would like to thank the developers! THANK YOU!

AND NOW.....ANOTHER QUESTION FOR YOU!

I scaled my objects with a factor between 0.0 and 1.0. I used

nodes = viz.phys.intersectNode(curs3D)
if len(nodes) > 0:
grabLink = viz.grab( curs3D, nodes[0] )

to detect if my 3D cursor intersect anyone of the objtect I would like to grab. Now, before scaling all my objects with the new factor, grabbing works perfectly!. But after having scaled my objects (exspecially with spheres), it happens that sometimes grab fails. Could be a bug of the intersect algorithm or may be the floating point precition is not very good, or may be there is a way to set a sort of sensibility for the grabbing.

Thank you so much for your help.
Giancarlo
Reply With Quote
  #2  
Old 12-14-2006, 03:52 PM
Gladsomebeast Gladsomebeast is offline
Member
 
Join Date: Mar 2005
Location: Isla Vizta, CA
Posts: 397
Check if you are scalling the objects before you are creating their physics shapes with the collide fucntions. You must create the physics shapes after you scale the objects.
__________________
Paul Elliott
WorldViz LLC
Reply With Quote
  #3  
Old 12-15-2006, 12:01 AM
giancamati giancamati is offline
Member
 
Join Date: Jun 2006
Posts: 27
Talking yes I did

These are the model with which grabbig looks a little different.
FATTORETRASLAY = 0.4
FATTORESCALA =0.2

palla1 = viz.add('3D/nuovo/palla1.wrl')
palla1.setScale(FATTORESCALA,FATTORESCALA,FATTORES CALA)
palla1.translate(0,FATTORETRASLAY,0)
palla1.collideMesh()

palla2 = viz.add('3D/nuovo/palla2.wrl')
palla2.setScale(FATTORESCALA,FATTORESCALA,FATTORES CALA)
palla2.translate(0,FATTORETRASLAY,0)
palla2.collideMesh()

Does this code fit with your previous suggestion?
Thank you.
Giancarlo
Reply With Quote
  #4  
Old 12-15-2006, 08:59 AM
Gladsomebeast Gladsomebeast is offline
Member
 
Join Date: Mar 2005
Location: Isla Vizta, CA
Posts: 397
That looks good. Does it work?
__________________
Paul Elliott
WorldViz LLC
Reply With Quote
  #5  
Old 12-15-2006, 09:02 AM
giancamati giancamati is offline
Member
 
Join Date: Jun 2006
Posts: 27
yes

Yes it works, but it happens sometime it miss the grab. So I should execute the grabbing operation again.
With object with a big scale, this problems never happenend.

Thank you.
Reply With Quote
  #6  
Old 12-15-2006, 09:24 AM
Gladsomebeast Gladsomebeast is offline
Member
 
Join Date: Mar 2005
Location: Isla Vizta, CA
Posts: 397
Try highligting the object when it is grabable. That way you will know when you can grab stuff.
__________________
Paul Elliott
WorldViz LLC
Reply With Quote
Reply


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


All times are GMT -7. The time now is 04:32 AM.


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