UI Health markers with Vive

Hello,

I would like to have floating text over certain objects. This text must be seen through the wall (this part is done) and it must also preserve its size on the SCREEN. Not in world. Even though the text itself is part of the world.

This is similar to World of Tanks or Xonotic’s CTF icons. Video to Xonotic:

. At the beginning of the video there is a marker “Red Base”.

I found quite a lot of solutions, including this one: Create UI health markers like in World of Tanks - Unity Engine - Unity Discussions.

However, the problem is that if I try to do this with the Vive camera, things won’t work. I set the Canvas to Screen Space - Camera and assigned the Vive’s camera to it. Still on luck. Has anyone done this before? I tried adding the text to Worldspace, however then the size of the text gets smaller, the further the player is from it.

Thanks!

Screen Space - Camera should work. Make sure you’ve assigned the Camera field.

If you want to use World Space, you can parent a canvas to the camera, not to the object. Then treat it like a screen space camera and position your object labels on it.

Or use world space parented to the object and scale it by distance from the camera.