On screen enemy indicating arrow
I am working on indicating on screen arrow to point towards the enemy. I have a environment which consist of a player and three gameobject placed at different position on the environment.I need an arrow indicating the gameobject,so that the player can move towards the gameobject in the environment.
You'll first want a way of selecting one of those GameObjects (or just taking the closest) to focus on and distinguish it from the other 2.
Assu$$anonymous$$g you want some UI object to act like a compass, you'll be using the character's (or the camera's) orientation. Depending on how your project is set up, your character likely rotates around either the Y or Z axis when turning.
You'll use this information to deter$$anonymous$$e how much your character would need to turn in order to face that object (some angle we'll call Theta). Then, you'll use that Theta value to deter$$anonymous$$e where the compass is pointing.
Your answer
Follow this Question
Related Questions
how do i remember a just instantiated prefab as a variable gameobject? 1 Answer
Return key triggering a button OnClick? 1 Answer
Objects are created in the same location. 0 Answers
Suggest best hosting server for multiplayer Game??? 0 Answers
Accessing variable from another gameobject does not work 2 Answers