How to calculate the Angle between the camera and an object

In my project, I need to calculate the Angle between the camera and an object, by which I can judge the display and hiding of objects. I tried, but the effect was not satisfactory

Are you normalising the vectors before using the dot product? If not, you can only really judge if something is in front or behind the vector you are you using.

If you normalise the vectors first, you will always get a value that is between -1 and +1 and it will be the cosine of the angle between them.

I used the standard vector but there were several angles that had the same value, and I remember on the official website there was a tutorial that told me how to do it, but now why can’t I access the tutorial project

I don’t get a value between minus 1 and 1, can you tell me how to calculate it

Did you normalise the vectors first before using dot product?

The problem has been well solved,Thanks