apologies, didn't know about code tags, wondered how people got it to display like that. Thanks for your help. My code is nowfloat distance = (clicker.transform.position - active_player.transform.position).magnitude; and it appears to be working now. however, I fixed the flipping problem by changing the code for rotation…
So, as I understand it, the clicker is the red box? If so, where is it's position getting updated for you to take the distance from it to the player? Also, you're referencing transform.position and transform.rotation in that code... which is going to give you the transform of the GameObject that this script is applied to.…
Hi guys. I'm a Unity noob, and a general coding noob, but I'm trying to jump into it. I'm trying to make this top down strategy game where you can switch between units and move with the arrow keys and mouse. The issue I'm running into is that when the player runs into the mouse it starts flipping around, which makes sense.…