Name above object C#

I’m trying to get a persistent name label above certain objects within my game. At the moment, I’m trying to use unifycommunity.com but it seems that the label continually moves and also appears when I turn the camera to face away from the object.

What I’m trying to get is a label that doesn’t move from the position above the object/character. I’m really stumped and any help would be appreciated :slight_smile:

You can check if the object isn’t behind the camera using a simple dot product between the camera’s forward direction and the direction camera->object - a negative dot product means the object is behind the camera.

  ...
  void Update(){
    if (Vector3.Dot(camTransform.forward, target.position-camTransform.position) < 0){
      // object behind camera:
      guiText.enabled = false; // make label invisible...
      return;  // and abort further calculations
    }
    guiText.enabled = true; // otherwise make label visible
    
    if (clampToScreen){ // rest of Update unmodified
        ...