Hi! Today I wanna ask how to get the rotation of y of an object, here is the small script I made
var fpscam : GameObject;
var lookDir : int = fpscam.transform.rotation.y;
function Update () {
Debug.Log(lookDir);
}
it doesn’t seem to work. The output should be the rotation of the target in y axis but the Console constantly says 0 but I checked the Inspector and the Y is moving while Im moving the object
Thanks!