Determine actor visibility using camera rotation
I trying to draw enemy healthbar over his head. At first I found bounding box that contains enemy:
Then I project world coordinates to screen:
And then use it like this:
And the problem is that when I rotate my camera (FPS) 180 dergees healthbar still visible on screen. I trying use LineOfSightTo() and GetLastRenderTime() to determine visible actor or not but the both affected only by obstacles not by camera rotation.
How can I fix it?
Finally I check UCanvas::Project() and find that if object behind the screen then result Z-component will be 0. And it works.
answered Nov 19 '15 at 07:07 AM
Follow this question
Once you sign in you will be able to subscribe for any updates here