VR Sniper Rifle / Rocket Launcher


Staff member
I can add it to our list of things to add, but the demo scene content is meant to just show an example of the weapons working. I imagine that you'll be replacing all of the weapons with your own anyway. I'm not sure the best way to approach the sniper though with zooming, I'll need to see how other games do it.


New member
You could start/end zooming by pressing the a/x button of the controller. Will try to find a game with sniper rifle and will tell you how they made it if I can find a game.


New member
Zooming in VR is typically just a render texture put on the scope showing the view from a camera at the gun's barrel with very low FOV. It's then always enabled so the player can just bring the scope up to their eye and look through it at any point. From there some games like Onward have gone a step further and have a shader for the render texture that makes it so you can only see clearly through it from straight on, looking at an angle messes up the view through it like on a real scope (most games don't do this part).

It is basically the setup on the AssaultRifle just always active. You don't want to have a button press for zooming in VR unless you are doing single hand VR, in which case you can just bring up the render texture scope in front of one eye's camera while leaving the other as normal. If it is 6DOF (position + rotation tracking) then you should just let the player bring the scope up to their eye and look through it the way they naturally would.
UFPS Scope Example.png
Last edited: