PDA

View Full Version : viz.grab() on subobjects


NASA GRC
11-03-2009, 12:44 PM
I'm using the viz.grab() function such that the user's virtual hand can grab objects in the scene, or just subobjects of a model, and pull them apart.

When I use the call to grab the top level of a model's scene graph, it works just fine, the model is linked to the hand. However, when I use the call to grab a subobject (as modeled in an external modeling package, NOT created as a child in vizard code), it doesnt work very well. The subobject is clearly selected and being transformed, however it doenst link rigidly to the hand, but rather it seems to rotate around its local origin in place rather than moving with the hand.

Has anyone else seen this? Whats going on here? Any fixes?

Thanks.

farshizzo
11-03-2009, 12:51 PM
Have you tried enabling the absolute option when calling the viz.grab function? This should perform the grab in absolute global coordinates. However, this assumes the parent of the sub-object is not being transformed during the grab operation.

NASA GRC
11-03-2009, 01:08 PM
Yes, that fixed it. *blush*

I looked for that exact thing before. How did I miss it? :confused:

Thanks for your help.