mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-30 22:15:32 +00:00
Head/hand directed movement option
This commit is contained in:
parent
89ff075936
commit
2a534877da
3 changed files with 19 additions and 11 deletions
|
@ -41,6 +41,7 @@ namespace MWVR
|
|||
VRSession::VRSession()
|
||||
: mXrSyncPhase{FramePhase::Cull}
|
||||
{
|
||||
mHandDirectedMovement = Settings::Manager::getBool("hand directed movement", "VR");
|
||||
auto syncPhase = Settings::Manager::getString("openxr sync phase", "VR");
|
||||
syncPhase = Misc::StringUtils::lowerCase(syncPhase);
|
||||
if (syncPhase == "update")
|
||||
|
@ -306,6 +307,8 @@ namespace MWVR
|
|||
{
|
||||
if (!getFrame(FramePhase::Update))
|
||||
beginPhase(FramePhase::Update);
|
||||
if (mHandDirectedMovement)
|
||||
{
|
||||
auto frameMeta = getFrame(FramePhase::Update).get();
|
||||
|
||||
float headYaw = 0.f;
|
||||
|
@ -322,6 +325,7 @@ namespace MWVR
|
|||
yaw = handYaw - headYaw;
|
||||
pitch = handPitch - headPitch;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -83,6 +83,7 @@ namespace MWVR
|
|||
std::condition_variable mCondition{};
|
||||
FramePhase mXrSyncPhase{ FramePhase::Cull };
|
||||
|
||||
bool mHandDirectedMovement{ false };
|
||||
bool mUseSteadyClock{ false };
|
||||
long long mFrames{ 0 };
|
||||
long long mLastRenderedFrame{ 0 };
|
||||
|
|
|
@ -942,3 +942,6 @@ log all openxr calls = false
|
|||
|
||||
# If false, openmw will quit with an exception if an openxr call fails for any reason
|
||||
continue on errors = true
|
||||
|
||||
# If true, movement direction is taken from the left hand tracker, instead of your head.
|
||||
hand directed movement = false
|
Loading…
Reference in a new issue