- Home /
Other Players Indicators
I am working on some game and stuck with a problem to show the indicators of other players on the screen.
I am not able to think how to go about the problem as the position of all the other players is changing with time in 3D space and how to represent them on the 2D screen of camera.
It would be great if I can get some references.
thanks in advance :)
Answer by Fattie · May 25, 2013 at 07:04 AM
to get you started, get the position of a player in PP and the position of you in UU. These are Vector3.
Next do this
var DirectionToThisPlayer:Vector3;
DirectionToThisPlayer = PP - UU;
DirectionToThisPlayer = DirectionToThisPlayer.normalized;
Now do this to draw it and see how you're doing
Debug.DrawLine(UU, DirectionToThisPlayer, Color.Blue, 1 );
Great its working, but there is a small glitch. I can see two lines for each object from my plane.
And how to show the direction blips with label on the screen, as in how to show the triangles on the screen edges...??
I know it won't be sincere, but it would be great if you could explain how it works.
Thanks in advance!
be sure to ask a NEW QUESTION about that detail, post some code and so on. Enjoy!
yeah sure, but I thought it was related to the first question; actually I found another solution which perfectly worked with my above screen.
http://wiki.unity3d.com/index.php?title=ObjectLabel
this worked like a charm...thanks for your replies
Your answer
![](https://koobas.hobune.stream/wayback/20220613102906im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Creating dynamically sized projectors 0 Answers
White lines between the tiles. 1 Answer
How to indicate or highlight a target tile. 0 Answers
make line Indicator invisible 1 Answer
Damage Indicator not showing correct position of attack. 0 Answers