Convert Vector3 to Int using Horizontal Slider?

I am using the First Person Control (Standard Assets Mobile) script to use my movement and look. I am trying to be able to edit the look speed in game using GUI.HorizontalSlider. However, the lookRotation var is Vector2 and I do not know how to use the slider value to change the vector. Here is the lookRotation var:

 static var rotationSpeed : Vector2 = Vector2( 80, 80 );	// Camera rotation speed for each axis

Annnd the horizontal slider:

#pragma strict
@script ExecuteInEditMode ()

var sliderValue : int = 0;


function OnGUI () {
sliderValue = GUI.HorizontalSlider(Rect(25,25,100,30), sliderValue, 30, 150);
}

Points will be given :slight_smile:

Well a vector2 has x and y properties…

And if you want it to stay square you can just use rotationSpeed = Vector2.one * sliderValue.