Hello
in FPS Games
There Is Arc Tell You From Where You Got Hitted
I Actually i don’t know what its called
But here picture
i what to know what the name of that thing
and how i can make it in Unity3D
Thanks,
Hello
in FPS Games
There Is Arc Tell You From Where You Got Hitted
I Actually i don’t know what its called
But here picture
i what to know what the name of that thing
and how i can make it in Unity3D
Thanks,
You need 2 sets of codes to make this work:
Part 1: Calculating the angle
You need to gain access to these 2 information ( you need to figure this out yourself ):
transform.position
)You can then use Vector2.Angle to calculate the angle of the shooter relative to the player
float angle = Vector2.Angle(
new Vector2( ... ),
new Vector2( ... ) );
Part 2: Rotating a texture
Using the angle
you get from the previous calculation, use it to rotate a texture in OnGUI()
.
A solution is posted here at Unity’s Answer. It is the answer with lots of upvotes, but it is not the answer accepted by the question poster.