I am presently trying to finish up a PC version of Jogger, which is a VR game where you jog on the spot to move forward.
On Mobile I used a asset from the asset store called VR Step to handle the forward motion which I then tweaked to work on the Oculus. I have one problem I can’t seem to work out though and was hoping someone here could point me in the right direction.
On mobile it used the gyro to get the up and down motion used to detect running on the spot, but on the Oculus I use the camera position because it’s tracking the users head.
This works until I look up or down because the camera is where the eyes are and you rotate your head from the base of the skull which means the main camera translates up and down while looking in the same directions.
What I need is a way to subtract the head rotation from the vertical movement caused by looking up or down, but I have no idea how to convert the camera upwards angle into distance.
For a better understanding of what I’m doing, this is the plug-in I used and the second video on the page is the mobile version of Jogger.