an interesting MouseLook script issue

hello,

Im sure your all familiar with the default Mouselook script in the fps controller. when you move your mouse the camera doesn’t quite catch up with the cursor and so the cursor is not in the middle of the screen. My question is can I quickly modify the script to keep the cursor in the middle of the screen and how, or do I have to make a whole other script that does it entirely differently?

thanks in advance.

Hide the mouse cursor. Draw crosshairs.

The cursor is not supposed to guide the camera - the camera just follows mouse movement, but not at the same pace as the cursor. You can add a cheap crosshair doing the following:

  • Create a GUIText and modify its properties in the Inspector:

Text: +

Anchor: middle center

Alignment: center

  • Select also the font and a reasonable size (say, Arial and size=30)

  • Set Position to 0.5 0.5 0

And it’s ready! Now this cheap crosshair will be kept exactly at the center of the screen. If it works for you, but you want a more sophisticated aim, draw a crosshair and use GUITexture instead of GUIText. But if what you really want is the camera to follow the cursor, then the mouseLook script should be replaced.