private void DetectRotateInput() { float xInput = Input.GetAxisRaw("Mouse X"); float yInput = Input.GetAxisRaw("Mouse Y"); if (xInput != 0 || yInput != 0) { yInput = invertVertical ? -yInput : yInput; Vector3 rotation = new Vector3(yInput, xInput, 0); RotateInput.Invoke(rotation); } }
void DetectRotateInput() { float xInput = Input.GetAxisRaw("Mouse X"); float yInput = Input.GetAxisRaw("Mouse Y"); if (xInput != 0 || yInput != 0) { if (invertVertical == true) { yInput = -yInput; } Vector3 rotation = new Vector3(yInput, xInput, 0); RotateInput?.Invoke(rotation); } }
void DetectRotateInput() { float xInput = Input.GetAxisRaw("Mouse X"); float yInput = Input.GetAxisRaw("Mouse Y"); if (xInput != 0 || yInput != 0) { if (_invertVertical == true) { yInput = -yInput; } } // LR should be y axis and updown is x axis Vector3 rotation = new Vector3(yInput, xInput, 0); // notify we have rotated RotateInput?.Invoke(rotation); }
void DetectRotateInput() { //get inputs from input controller float xInput = Input.GetAxisRaw("Mouse X"); float yInput = Input.GetAxisRaw("Mouse Y"); if (xInput != 0 || yInput != 0) { //account for inverted camera, if specified if (_invertVertical == true) { yInput = -yInput; } //mouse left/right should be x axis, up/down should be y Vector3 rotation = new Vector3(yInput, xInput, 0); //notify that we have rotated RotateInput?.Invoke(rotation); } }
void DetectRotateInput() { //get inputs float xInput = Input.GetAxisRaw("Mouse X"); float yInput = Input.GetAxisRaw("Mouse Y"); if (xInput != 0 || yInput != 0) { //check to see in camera movement is inverted if (_invertVertical == true) { yInput = -yInput; } //mouse left/right should be y axis, up/down x axis Vector3 rotation = new Vector3(yInput, xInput, 0); //notify that rotation has occured RotateInput?.Invoke(rotation); } }
void DetectRotateInput() { //get input from controller as a 0 or 1 float xInput = Input.GetAxisRaw("Mouse X"); float yInput = Input.GetAxisRaw("Mouse Y"); //Parse input if (xInput != 0 || yInput != 0) { //check for inverted camera if (_invertVertical) { yInput = -yInput; } //combine into a single vector Vector3 rotation = new Vector3(yInput, xInput, 0); //notify rotate RotateInput?.Invoke(rotation); } }