Im maiking and fps in unity and i need a small script that keeps the mouse/cursor restrained to the center of the screen
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.
Answer by spinaljack
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.
The best place to ask and answer questions about development with Unity.
To help users post good questions and use the site effectively we have posted a user guide.
If you are a new user, check out our FAQ for more information.
If you are a moderator, see our Moderator Guidelines page.
We are making improvements to UA, see the list of changes.
For troubleshooting common problems with Unity 5.x Editor (including Win 10).
Answers and Comments
No one has followed this question yet.
how to create a old (2D style) fps cursor
How to always have the mouse curser in the center of your game ?
Mouse Movement on z-axis
aiming with animation
Unity Web Player does not respond to mouse clicks