I am trying to rotate my character with a camera attached to it.
Camera is attached because it follows the character.
I am trying to use the slide to rotate the character
I attached the script to the character but because the camera is child on the character it is rotating the camera too which i don’t want
is there anyway to telling the camera not to see this script?
My script
#pragma strict
var hSliderValue : float = 0.0;
function Update() {
transform.eulerAngles = Vector3(0.0, hSliderValue, 0.0);
}
function OnGUI () {
hSliderValue = GUI.HorizontalSlider (Rect (25, 25, 200, 30), hSliderValue, -90, 90.0);
}