Making arrow point to an object.

What’s the best way to get a 2D arrow to stay on screen, almost like a GUI element, but have it point/stick to a specific object?

Essentially if the player is NOT facing the object, the arrow stays pointing towards the object but still stuck to the side’s of the screen. If the player is looking in the direction of the object, even if the object is on the other side of a wall, the arrow changes to something else like a circle but stays locked onto the object so the player knows which direction they have to go.

I’m just looking for a tip or a nudge in the right direction. :stuck_out_tongue: I’m assuming I’ll have to use Math.f, however I’m pretty new to all that. ha But need to start somewhere. :slight_smile:

Hello tecra134,
I am assuming you are making some sought of game where you have to follow the way point arrow to get to the objective. I am new to Unity3D as well, so I can’t help you myself.

But a quick google search came up with this Unity Answers result: Get a (GUI) 2d-arrow to turn to a specific position in 3d-space (similar to a compass) - Questions & Answers - Unity Discussions

I am pretty sure this will solve your problem.

Did you found any solution? I want to do something similar

I would suggest that you try to keep searching for your answer online, and/or post a thread about your issue.
This thread is very old. :slight_smile: