keep mouse in centre of screen

This is probably quite simple, but some assistance would speed things along. How does one get and keep the mouse right in the middle of the screen from the moment a scene starts?
So it always stays right in the middle?
Cheers
AC

if your cursor graphic is 64 pixels wide. half of that is 32. so…

function Start(){
transform.position = (Screen.width/2 - 32, Screen.height/2 - 32, 0);
}
or something like that. i haven’t messed with gui stuff too much yet…

If you’re talking about the system mouse pointer, you can’t. But you can turn it off and make a custom one that does (except that’s only really feasible for full-screen and not windowed).

–Eric

Thanks guys. This may take some figuring out. If you checkout the latest Portals posts you can download a webby. See how the mouse is not in the centre? thats what Im trying to resolve. Im interested to see what you little script does Pete. What are you working on these days?
AC

no time to look at portals atm. is it the mouse or a cross hair (texture)? i assumed cross hair. what i posted probably won’t work out of the box but half my screen width - half my texture width will center my texture left and right.

sadly, i’m mostly working on work (boohiss!) but finding a little time to brush up on scripting.