I have the following script which uses the mouse to rotate a cube(in local space). I’m trying to change it to rotating in world space. If I understand correctly: up will always be up, left will always be left, and so on. Does anyone know how I can modify my script to achieve this?
var horizontalSpeed : float = 2.0;
var verticalSpeed : float = 2.0;
function FixedUpdate () {
Screen.showCursor = false; //hide the mouse cursor in game
// Get the mouse delta. This is not in the range -1...1
var h : float = horizontalSpeed * Input.GetAxis ("Mouse X");
var v : float = verticalSpeed * Input.GetAxis ("Mouse Y");
transform.Rotate(-v, h, 0);
}