Hi Jonathan, I have done something similar to what you need by writing a custom dragger callback instead of the standard one assigned to the manipulated objects. In my case I manually rebuild the the motion matrix to apply to the target matrix transform, instead of getting the one that the MotionCommand provides.
An alternative might be writing a custom dragger to dispatch a UniformScaleCommand, which is the motion type you want, and none of the provided manipulators sends them. In that case you can keep using the standard callback, as the command will provide the correct motion matrix. Hope this helps, Ricky On Tue, Dec 4, 2012 at 3:15 PM, Jonathan McLaughlin <[email protected]>wrote: > Hi, > > I am using a osgManipulator::TabBoxDragger with > osgManipulator::Scale2DDraggers to scale objects within my scene. > > Currently when dragging one of the 2D Draggers the object will scale > accordingly but the centre of the object will not stay in the same > position. For example, if I grab the top left corner of a square and drag > to the left, the bottom right corner will stay where it is and the rest of > the object will move left while being rescaled. > > What I would like to happen is for the bottom right corner to move right > at the same rate as the top left corner moves left, all the while > maintaining the centre position of the object being scaled > > Effectively, what I want to do is scale while maintaining the proportions > on the plane I am scaling, however cant find a way to do this. > > Hopefully my explanation is comprehensible and not too long winded. Any > help on this would be appreciated. > > Thanks > > ------------------ > Read this topic online here: > http://forum.openscenegraph.org/viewtopic.php?p=51344#51344 > > > > > > _______________________________________________ > osg-users mailing list > [email protected] > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org >
_______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

