- Home /
Render object on top in Unity VR with SteamVR
Hello everybody,
I am trying to render an object on top of all other objects using SteamVR. I could'nt really find anything helpful in the internet. Everything I try has some unwished side effects.
I already tried using an additional 'normal' camera which only renders the object which should be on top and I tried using a second full CameraRig object to only render this object. It worked somehow, but in both cases, there were side effects like a controller duplicate or positions of some objects were wrong.
Without VR it is quite easy and I know how to do it. Does somebody know the proper way to do this in Unity VR?
Thanks!
Answer by · Aug 04, 2017 at 05:41 PM
You can change the render order of the material inspector ou change it on the script. But there are come problems with this. In VR you don't see in 2D, it's "real" 3D so the object position in the 3D world really matters. Example: If you cave a cube that is behind a sphere, it is possible to render the cube in front, but your brain will notice that the depth is wrong because the 3D effect is telling te truth. This is really uncomfortable to see in VR and it is highly recommended not to do this.
Ahh, okay, now I know where the problem is.
Thank you for your explanation and quick reply, I'll try to do it by changing the materials render order and see if it works for me/my project.
Thanks!
Your answer
Follow this Question
Related Questions
Render texture fullscreen on top of camera output 0 Answers
How do you change the dimensions of the Steam VR view on the mirror screen (URP) 2 Answers
A scene with multiple cameras shows black screen on VR mode 0 Answers
Render a Avatar head smaller for only one camera 1 Answer
Unity 2019.3 URP VR [Htc Vive] - post-processing not working properly 0 Answers