MF_B_MouseLook
A simple script to turn a camera with the mouse, FPS style.
Press ‘~’ to activate/deactivate mouse aiming. (Escape has a reserved use in the editor.)
Press ‘z’ to toggle the zoom level.
Public Variables
sensitivity : float
Sensitivity of mouse input to turn camera. Higher equals faster turning.
elevationLimit : float
In degrees. Limits the up-down angle of the camera.
zoom : float
The magnification factor when zoomed in.
mouseControl : bool
If true, the cursor will be centered and hidden, and the camera will follow the mouse.
aimObjectActive : bool
If true, will show the aim object when under mouse control.
aimObject : GameObject
This is the object shown while aimObjectActive is true.
A simple script to turn a camera with the mouse, FPS style.
Press ‘~’ to activate/deactivate mouse aiming. (Escape has a reserved use in the editor.)
Press ‘z’ to toggle the zoom level.
Public Variables
sensitivity : float
Sensitivity of mouse input to turn camera. Higher equals faster turning.
elevationLimit : float
In degrees. Limits the up-down angle of the camera.
zoom : float
The magnification factor when zoomed in.
mouseControl : bool
If true, the cursor will be centered and hidden, and the camera will follow the mouse.
aimObjectActive : bool
If true, will show the aim object when under mouse control.
aimObject : GameObject
This is the object shown while aimObjectActive is true.