From 734ffb5a4e944cb4eea8588e52a708f5237c6627 Mon Sep 17 00:00:00 2001 From: wangshuping42 <137563876@qq.com> Date: Fri, 12 Mar 2021 17:09:25 +0800 Subject: [PATCH] Update Translate1DDragger.cpp When linedir is (0,0,1), the cone on the left (i.e. the bottom) is not oriented correctly. --- src/osgManipulator/Translate1DDragger.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/osgManipulator/Translate1DDragger.cpp b/src/osgManipulator/Translate1DDragger.cpp index b44cb68d39b..2a73d7beba1 100644 --- a/src/osgManipulator/Translate1DDragger.cpp +++ b/src/osgManipulator/Translate1DDragger.cpp @@ -140,7 +140,7 @@ void Translate1DDragger::setupDefaultGeometry() { osg::Cone* cone = new osg::Cone (_projector->getLineStart(), 0.025f * lineLength, 0.10f * lineLength); osg::Quat rotation; - rotation.makeRotate(lineDir, osg::Vec3(0.0f, 0.0f, 1.0f)); + rotation.makeRotate(osg::Vec3(0.0f, 0.0f, 1.0f),-lineDir); cone->setRotation(rotation); geode->addDrawable(new osg::ShapeDrawable(cone));