PUN+UCC Let the character die

Super Tom

New member
hi Justin! I want to know how to make my character disappear after death in a multiplayer game. I now have HP. I tried to delete the character directly after the HP is 0 - death, but this will make the game error. The problem is in the camera, which prompts the camera to not find the character object, as shown in the following figure. Then I tried to hide the character when the character's HP is 0, but it doesn't work, How can I make a character disappear when its health value is 0.
 

Attachments

  • d491f4212463c3abece4c96296c6b1c.png
    d491f4212463c3abece4c96296c6b1c.png
    63.7 KB · Views: 4
If you disable the character you could also set the CameraController.Character property to null so it no longer tracks.
 
Top