- Home /
FPS Camera moving by my left mouse button
HI my question is simple but I just can't find it anywhere.
I Try to modify my own FPS walker script to make the camera move by my left mouse click button. Instead of the keyboard W-S etc move button.
Can someone help me thanks A.
Comment
Answer by NetFox · Aug 09, 2010 at 04:18 PM
This is from the unity Scripting Reference. I hope this answers your question?
Input.GetMouseButton
static function GetMouseButton (button : int) : bool Description Returns whether the the given mouse button is held down.
/button/ values are 0 for left button, 1 for right button, 2 for the middle button.
http://unity3d.com/support/documentation/ScriptReference/Input.GetMouseButton.html