- Home /
How do I manually offset a VR players head?
Ok. So what I am trying to do is ridiculous, and probably sickness inducing. But I am having fun in VR so let me have this! What I am trying to do is make a game where you play as a giraffe. I want to offset the players point of view in VR so that their POV is from about 10ft above where their actual head is. So if they look down in reality, their vr head will swing in a wide arc bringing them closer to the ground. I am using the SteamVR plugin to manage my vr and it really doesn't want to let me do this.
If I set the VR Eye position in Update() Editor shows that the object has moved to the correct position, but the image rendered to the headset does not.
Here's the really fun part. If I set the VR Eye position in OnPreRender() it works perfectly! But only in the right eye! The left eye continues to render from the normal head position!
I assume somewhere the value is being updated, probably to render from the second eye position, but I can't figure out where that logic is run to modify the position. I don't see it in the steam VR_Camera script.
Does anyone know what is resetting the camera position, and/or how I can modify it?
Answer by MUG806 · Feb 19, 2021 at 11:22 PM
Its not really intended to manually change the positions of the various tracked objects within the vr rig, however you can move the entire rig, or scale it. You could try finding the position of the head within the vr rig space, and then also move the position of the rig itself by a multiple of that amount. Scaling the rig will have similar effects, but will also make everything appear smaller.
I've played with variations of that in other games actually. The problem with that is it scales the player uniformly. Like, with no other indicators, the player won't notice anything has changed.
What I am looking for is an effect where the players head is placed 1-10ft up but the pivot point remains at the original head location.
In that case go with my first suggestion of moving the rig as the head moves, not scaling.
Doesn't moving the rig move the head with it? The head is a child of the rig, so if I try to move the rig based on head motion won't that create an infinite movement loop?
Your answer
Follow this Question
Related Questions
Steam VR Display Hurt HUD 0 Answers
Steam VR always asks for BINDING in starting the game 0 Answers
Apply Local Rotations to VR Camera 0 Answers
How to add Steam Vr Script "Interactable" during runtime without crashing on interact 0 Answers
Graphics look "wiggly" when moving to far from the origin (VR game) 0 Answers