Best practice: healthbars
Hi guys,
Well I'm sufficiently frustrated trying to figure this out on my own so I thought I'd reach out here.
I want to add healthbars over my characters heads. In a normal situation this is easy. You convert world coordinates to screen coordinates. But because you can't use the "screenspace- overlay" canvas, I feel like this has gotten trickier.
One idea would be to use a "screenspace- camera" canvas, but the canvas would need to be perfectly snapped to the camera frustum. And I have no idea how to do that or if any other complications from doing that would arise.
I did try rendering a screenspace camera to a render texture and attaching the render texture to the center eye anchor. But because I couldn't snap it into place correctly, and also maybe because the render plane was not the right dimensions, the result was WAY off.
Has anyone successfully done this??
Well I'm sufficiently frustrated trying to figure this out on my own so I thought I'd reach out here.
I want to add healthbars over my characters heads. In a normal situation this is easy. You convert world coordinates to screen coordinates. But because you can't use the "screenspace- overlay" canvas, I feel like this has gotten trickier.
One idea would be to use a "screenspace- camera" canvas, but the canvas would need to be perfectly snapped to the camera frustum. And I have no idea how to do that or if any other complications from doing that would arise.
I did try rendering a screenspace camera to a render texture and attaching the render texture to the center eye anchor. But because I couldn't snap it into place correctly, and also maybe because the render plane was not the right dimensions, the result was WAY off.
Has anyone successfully done this??
