How to get this clamped input on the local axis, so when I rotate in space(where there is no up or down) it works properly. What happens is that angleF rotates the player along the z axis so when that happens the input and camera still thinks there is up and down so input is made opposite… need that to be stopped!!
if(controlable){
angleH += Mathf.Clamp(Input.GetAxis("Mouse X"), -1, 1) * horizontalAimingSpeed * Time.deltaTime;
angleV += Mathf.Clamp(Input.GetAxis("Mouse Y"), -1, 1) * verticalAimingSpeed * Time.deltaTime;
angleV = Mathf.Clamp(angleV, minVerticalAngle, maxVerticalAngle);
//if(zeroG == true){
angleF += Mathf.Clamp(Input.GetAxis("Yaw"), -1, 1) * horizontalAimingSpeed * Time.deltaTime; //
//}
}
// }
// Set aim rotation... this is the part where it gets set.
Quaternion aimRotation = Quaternion.Euler(-angleV, angleH, angleF);
Quaternion camYRotation = Quaternion.Euler(0, angleH, 0);
camera.rotation = aimRotation;
Setting the final rotation on local axis does not work.
I need to get that input in the Space.Self basically.