1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-16 07:49:56 +00:00

Hud alongside arm instead of across to avoid getting eaten by shields

This commit is contained in:
Mads Buvik Sandvei 2020-11-28 18:58:23 +01:00
parent 46cbb5dc74
commit fde6cc231e

View file

@ -271,8 +271,10 @@ namespace MWVR
mTrackedPose.position = world.getTrans(); mTrackedPose.position = world.getTrans();
mTrackedPose.orientation = world.getRotate(); mTrackedPose.orientation = world.getRotate();
if (mConfig.trackingMode == TrackingMode::HudRightHand) if (mConfig.trackingMode == TrackingMode::HudRightHand)
{
mTrackedPose.orientation = osg::Quat(osg::PI, osg::Vec3(1, 0, 0)) * mTrackedPose.orientation; mTrackedPose.orientation = osg::Quat(osg::PI, osg::Vec3(1, 0, 0)) * mTrackedPose.orientation;
mTrackedPose.orientation = osg::Quat(osg::PI_2, osg::Vec3(0, 0, 1)) * mTrackedPose.orientation; mTrackedPose.orientation = osg::Quat(osg::PI_2, osg::Vec3(0, 0, 1)) * mTrackedPose.orientation;
}
mTrackedPose.orientation = osg::Quat(osg::PI, osg::Vec3(1, 0, 0)) * mTrackedPose.orientation; mTrackedPose.orientation = osg::Quat(osg::PI, osg::Vec3(1, 0, 0)) * mTrackedPose.orientation;
} }
} }
@ -488,7 +490,7 @@ namespace MWVR
10, 10,
false, false,
osg::Vec4{0.f,0.f,0.f,.75f}, osg::Vec4{0.f,0.f,0.f,.75f},
osg::Vec3(0.025f,.025f,.066f), // offset (meters) osg::Vec3(0.025f,-.0501f,.066f), // offset (meters)
osg::Vec2(0.f,0.5f), // center (model space) osg::Vec2(0.f,0.5f), // center (model space)
osg::Vec2(.25f, .25f), // extent (meters) osg::Vec2(.25f, .25f), // extent (meters)
2048, // Spatial resolution (pixels per meter) 2048, // Spatial resolution (pixels per meter)
@ -533,7 +535,7 @@ namespace MWVR
0, 0,
false, // side-by-side false, // side-by-side
osg::Vec4{}, // background osg::Vec4{}, // background
osg::Vec3(0.025f,.025f,.066f), // offset (meters) osg::Vec3(0.025f,-.050f,.066f), // offset (meters)
osg::Vec2(0.f,0.5f), // center (model space) osg::Vec2(0.f,0.5f), // center (model space)
osg::Vec2(.1f, .1f), // extent (meters) osg::Vec2(.1f, .1f), // extent (meters)
1024, // resolution (pixels per meter) 1024, // resolution (pixels per meter)