#1
|
|||
|
|||
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 |
#2
|
|||
|
|||
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 |
#3
|
|||
|
|||
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 |
#4
|
|||
|
|||
That looks good. Does it work?
__________________
Paul Elliott WorldViz LLC |
#5
|
|||
|
|||
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. |
#6
|
|||
|
|||
Try highligting the object when it is grabable. That way you will know when you can grab stuff.
__________________
Paul Elliott WorldViz LLC |
|
|