Hi there,
I have seem many questions like this but none seem to help me fix my issue! So when my player moves in a direction, the cone of light that is on him is facing the opposite direction and i cant seem to figure out why? Here is my code:
if (playerJoyStick.inputDirection != Vector2.zero)
{
float angle = Mathf.Atan2(playerJoyStick.inputDirection.y, playerJoyStick.inputDirection.x) * Mathf.Rad2Deg;
localPlayerInstance.transform.localRotation = Quaternion.AngleAxis(angle, Vector3.forward);
movement = playerJoyStick.inputDirection;
}
In the picture you can see that the joystick is facing up however the cone of light is facing down…
Thanks for any help in advance!