Im maiking and fps in unity and i need a small script that keeps the mouse/cursor restrained to the center of the screen
Sep 08, 2010 at 08:59 PM
Are you just trying to get the crosshair to stay in the middle of the screen so you constantly fire in the middle of the screen?
If that's the case you should check out the FPS tutorial on how to easily do so.
I think you might run into some issues with trying to take functionality from the mouse by restricting it to not be able to move.
Sep 08, 2010 at 10:09 PM
Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.
Once you sign in you will be able to subscribe for any updates here
Answers and Comments
The best place to ask and answer questions about development with Unity. Check out our FAQ for more information.
We're looking for more community managers.
To help users post good questions and use the site effectively we have posted a tutorial video. Please check it out.
asked: Sep 08, 2010 at 08:59 PM
Seen: 7357 times
Last Updated: Sep 08, 2010 at 08:59 PM
How can I produce the typical FPS mouse steering effect?
FPS collider center offsets camera pivot?
If (increasing/decreasing)? check if something is increasing or decreasing
Mouse Movement on z-axis
Click Once to play an entire animation
How to make object fallow the mouse ??
aiming with animation
Getting the angle between two screen points based on them not screen orgin
Locking the mouse cursor without it centering after unlocking it?