Changing from local to world space

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);
    
    }

See the docs for Rotate; you can supply Space.World rather than the default Space.Self.

–Eric

Thanks for the tip. I’m having a hard time finding out where to place it in my script. But I’ll keep at it!

I think I got! I changed line 10 to:

transform.Rotate(-v, h, 0, Space.World);