|
|
@ -111,7 +111,7 @@ namespace MWMechanics
|
|
|
|
osg::Vec3f dir = to - from;
|
|
|
|
osg::Vec3f dir = to - from;
|
|
|
|
dir.z() = 0;
|
|
|
|
dir.z() = 0;
|
|
|
|
dir.normalize();
|
|
|
|
dir.normalize();
|
|
|
|
float verticalOffset = 200; // instead of '200' here we want the height of the actor
|
|
|
|
float verticalOffset = 200; // instead of '200' here we want the height of the actor
|
|
|
|
osg::Vec3f _from = from + dir*offsetXY + osg::Z_AXIS * verticalOffset;
|
|
|
|
osg::Vec3f _from = from + dir*offsetXY + osg::Z_AXIS * verticalOffset;
|
|
|
|
|
|
|
|
|
|
|
|
// cast up-down ray and find height in world space of hit
|
|
|
|
// cast up-down ray and find height in world space of hit
|
|
|
|