- Home /
Too difficult to answer all in one question
Pointing a health bar to client camera
I'm new to networking. I have a 3D player prefab with a child camera, and a healthbar canvas above the player's head.
I want all the individual healthbars to point towards the client camera, so they always appear flat to every player, regardless of the location/rotation of the player with the healthbar.
I know this means the pointing of the healthbar has to be client-based, but I'm not sure how to set it up other than that.
Any advice or tutorials welcome, thanks!
Answer by Karsten · Apr 08, 2018 at 06:16 AM
That is how you point things. However, the problem here is the health bars have to be rotated to look at the player camera only for that player. So each health bar has to be pointing at each camera.
You can check who the owner o the client is when using networking. So point it towards that player. This will make that it always points to who ever owns the current client, and sicne this is a client side action it won't impede on the other players/network