- Home /
Question by
WJ_Fitzgerald · Aug 07, 2014 at 09:30 PM ·
cameracontrols
How to Invert my Camera Controls
Currently I am using the following script to be able to rotate an object around as if it were being displayed (like a portfolio piece in real-time). My problem is that up goes down, and down goes up, when my mouse gives input on the Y axis.
I realize this is probably a super simple fix. I've looked around and cannot figure this out. Thanks for your help!
var speed : float = 100.0;
function Update(){
if (Input.GetMouseButton(0)) {
transform.Rotate(Vector3(Input.GetAxis("Mouse Y"), Input.GetAxis("Mouse X"), 0) * Time.deltaTime * speed);
}
}
Comment
Take this part:
Input.GetAxis("$$anonymous$$ouse Y")
And multiply by negative one:
-Input.GetAxis("$$anonymous$$ouse Y")
Your answer