Question by
CodeDen · May 04, 2018 at 12:14 PM ·
c#rotation axismouse input
Different values for Axis parameters "Mouse Y" (Z)
I need to set different values for Axis parameters "Mouse Y" (Z). something like
if (Input.GetKey ("q"))
{
float v = 15 * Time.deltaTime;
rb.AddTorque (new Vector3 (0, 0, v));
}
if (Input.GetKey ("e"))
{
float v = -30 * Time.deltaTime;
rb.AddTorque (new Vector3 (0, 0, v));
}
the values of the rotations for each axis must be different (Y +, Y-, Z +, Z-), and not the same as in the sets of examples
line from the help
float h = horizontalSpeed * Input.GetAxis ("Mouse X");
float v = verticalSpeed * Input.GetAxis ("Mouse Y");
transform.Rotate (v, h, 0);
//translate.google
Comment