Help with some math!

Hi guys!

Umm i have this Blend tree:
108569-צילום-מסך-20180104-ב210541.png

I want to make the red dot to be my enemy!
The player is always facing towards the enemy, I used this code to get the angle between where the player is facing and the key press.

Vector3 direction = new Vector3 (iH.horizontal, 0, iH.vertical);
		direction = Camera.main.transform.TransformDirection (direction);
		direction.y = 0f;

		float angle = Vector3.SignedAngle (transform.forward, direction, Vector3.up);

but i cant find the solution for making the red dot be where the enemy location is…
I tried this:

		Vector2 relativeToEnemy = new Vector2 (Mathf.Cos (temp), Mathf.Sin (temp));

but for some reason it has a weird behavior to it…

Please help me! I’m on this problem for 4 days!!

angle between where the player is facing and the key press
Sorry i don’t understand which angle you want to measure exactly or at least that last part.

However, if you have made sure the “angle” variable is calculated correctly, your “relativeToEnemy” vector shouldn’t be far off. It’s a pity your code doesn’t show how your “angle” variable translates to your “temp”
variable (and the naming isn’t helping either). I guess you have already multiplied it with Mathf.Deg2Rad?