- Home /
Steam VR Render object to only one eye
So I'm trying to make a realistic Scope for a gun. It is set up as a quad with a RenderTexture and a Camera rendering to the RenderTexture. I then have the Camera rotate depending on the players Head position such that you need to look through the scope straight on to aim accurately. The problem is, the cameras rotation vector is based of of the center of the head and not the eye. this means that if you look through the scope with either your right or left eye it will not point straight.
Ideally i would like to have it so the scope will render differently to each eye, but failing that I would at least like to know how to get the individual eyes position rather than the head as a whole.
So Update, I found that you can get the Location of the individual eyes by doing:
UnityEngine.VR.InputTracking.GetLocalPosition(UnityEngine.VR.VRNode.RightEye);
So I may be able to make a super Hacky workaround and position the camera based off of which eye is closer, but if anyone knows how to actually solve this problem, I would be quite great full.
Answer by hectorux · Jun 28, 2018 at 11:23 PM
The head doesnt have 2 cameras atached to it? or may i be too back on time from that times?
The S$$anonymous$$m VR camera Rig has one eye cam that I'm pretty sure does two passes(one for each eye). so I can't just set up culling for each eye
Your answer
Follow this Question
Related Questions
How to access to SteamVR Camera? 1 Answer
HTC Vive Camera Height [VRTK] [Steam VR] [Open VR] 1 Answer
Render texture breaking in VR 0 Answers
RenderTexture.active for a non-VR camera in a VR project 0 Answers
VR camera position instant flick 0 Answers