Hello, is that possible to make a script that tells the player’s in which direction to watch to see an object with floats? If yes, how could I do that?
(Something like this)
Hello, is that possible to make a script that tells the player’s in which direction to watch to see an object with floats? If yes, how could I do that?
(Something like this)
You can use Vector3.SignedAngle to get the angle and the direction in which to look. According to the image, i believe you want to have separate indicators for the horizontal and vertical axis, so you could calculate 2 angles instead, by assuming it’s at y = 0 (or y = playerY) to get the horizontal angle, and vice versa for the vertical one.
That way you’d have two angles, plus the direction in which to look for each of them, which is similar to the image.
Mhhh I have a problem, for some reason I need to use a GameObject but Vector3.SignedAngle is not working with GameObject, is their a way to use a GameObject as a Transform ?
transform is one of GameObjects properties.
So it should be Target.transform.position (u literally use it couple lines above lol).
me bad xD