Hi David,
Thanks! It turns out that I had it almost right. It was adding the scaling to the translateaxis that made it work. I did not know that was necessary.
Well, it wouldn't have been necessary if the TrackballDragger didn't have an invisible sphere in the middle.
If you look at the way it creates the geometry used for intersection (the one that's set to always cull), it has 3 cylinders for constrained rotation around one axis each, and a sphere in the middle for unconstrained rotation. This sphere is pretty much the same size as the axes of the TranslateAxisDragger, so it receives clicks before the axes (because from most points of view the surface of the sphere will be intersected before the axes). Also we found that people wanted to be able to click on the translation axes inside the rotation cylinders, and so the sphere was really in the way (and since it's invisible, users were confused when the object would start rotating when they clicked there). So we subclassed the TrackballDragger to remove that sphere, as I said in my previous message.
So, the scale was not strictly required, it's just that in your case, since the sphere is still there, it makes the axes larger than the sphere and therefore clickable.
BTW, one way I found to debug these interaction problems was to subclass the draggers, copy the contents of the setupDefaultGeometry() method from the base class to the derived one, and comment out the setDrawableToAlwaysCull() calls. That way you will see what geometry is used for the intersection tests, and it will become clear why the dragger is behaving the way it is. In your case, you would have seen that the TrackballDragger's sphere was completely encompassing the TranslateAxisDragger's axes, so that's why that dragger was never getting any intersections.
Hope this helps, J-S -- ______________________________________________________ Jean-Sebastien Guay [email protected] http://www.cm-labs.com/ http://whitestar02.webhop.org/ _______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

