Hey there, I'm working in unity to try and create a realistic Gun System. The component i've been working on most recently has bee the weapons scope. As of right no I have a camera that rotates based on the players headpos relative to itself rendering to a render texture, such that the player must look straight through the scope to aim accurately. the problem with this is that the scope cams position is based off of the mid point between the eyes, I can fix that by offseting it by half the lense distance, but because steam VR in unity only has one camera for both the eyes, I can only offset it for one eye at a time.
I don't know exactly how the Steam VR camera works, if its 1 camera that does two passes per frame or if the two eyes have seperate cameras that are just unaccessable for some reason. but what I need to be able to do is either: gain access to the indevidual eye cams to set Culling Masks and put two render textures in my scene(one seen by each eye cam), or if its a multi pass system, I need some way of updating either the steamVR camera, or the render texture between the passes. I have been looking online and through the unity documentation for days now and can not figure out either of these or any other solution. If any of you folks know how to solve this I'd be eternally greatfull.
Thanks, I added a second Camera to the rig and was able to set the culling masks to get a stereoscopic effect. The only thing I now need is to figure out is how to get the distance between(or preferably the actual position of) the eyes.
@OutofRam, the current best practice is to scale the entire "head" via transform depending on the IPD reported by OpenVR's APIs. If you simply "move" the camera rigs, it's very easy find yourself in a situation where the game makes little perceptual sense increasing risk of motion sickness.