WorldViz User Forum

WorldViz User Forum (
-   Vizard (
-   -   Vizconnect grabber grab area (

szkuls 12-01-2015 03:26 PM

Vizconnect grabber grab area

I am able to get the grabber tool working with vizconnect but the hotspot for grabbing an object seems to be the same size at the center or pivot of the object no matter how large or small the object is. For example here is a code snippet with two cubes. The one on the left is easily highlighted and grabbed where as the larger cube on the right can still be grabbed but is very difficult to see where the hand is or if you are close to the center of the cube to make the grab.


import viz
import vizconnect
import vizshape

vizconnect.go ('')

scene = viz.addChild ('piazza.osgb')

smallBox = vizshape.addBox (size = (1,1,1))
smallBox.setPosition ([0, 1, 0])
bigBox = vizshape.addBox (size = (5,5,5))
bigBox.setPosition  ([6, 3, 0])

tool = vizconnect.getRawTool ('grabber')
tool.setItems ([smallBox, bigBox])

Is there a way to adjust the hotspot or collision/intersection area of the items that are set to grabbable? Ideally, I would like to have the bounding box be the intersection area for the the hand to grab.


Jeff 12-02-2015 05:08 PM

Thanks for the example, I'll check with a developer about this.

Jeff 12-17-2015 11:30 PM

1 Attachment(s)
The grabber tool intersection test is based on the distance to the center of the object. You can, however, modify the distance test used so that it works with the bounding box. The attached example should work, but this is not officially supported code.

All times are GMT -7. The time now is 01:38 PM.

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