philhzss / OttoMatic-VR

A VR port of Pangea Software’s Otto Matic 🤖
https://pangeasoft.net/otto
Other
2 stars 0 forks source link

Using thumbstick to rotate view screws up VR position tracking XZ #21

Closed philhzss closed 2 years ago

philhzss commented 3 years ago

Positional walking axes ref #18 are screwed up as soon as you use anything other than the HMD to turn, for example the thumbstick ref #17

Most certainly because I'm just using hmdPosDeltas to figure out where we are in the worldspace, not considering thumbstick rotation. Just like the rotation-snap bug after rocket deplaning, it looks like if theNode->Rot.y is not exactly equal to vrpos_hmdYaw, the axes are off. But we can't have it be exactly equal as that would prohibit any other method of rotation (such as thumbsticks). Will have to keep track of our difference ourselves in a separate variable

~Also vrHMDPosMovedeltaWorldspace should probably just be a global and not part of gPlayerInfo.~ Done in 6d2abb3

philhzss commented 3 years ago

Fixed in 4a23151 by adjusting gVrHMDPosMovedeltaWorldspace to consider which way the HMD is facing, including correcting for thumbstick yaw

https://github.com/fordcars/OttoMatic-VR/blob/4a231512af7e93966f6bfab0b261c253a713e720/src/Player/Player_Robot.c#L2146-L2154