10-19-2015 05:48 PM
10-24-2015 02:52 PM
10-26-2015 04:02 PM
#if !UNITY_ANDROID || UNITY_EDITOR
if (!SkipMouseRotation)
euler.y += Input.GetAxis("Mouse X") * rotateInfluence * 3.25f;
if(Input.GetMouseButton(0)) // If finger touching touchpad.
{
// If a static or forward swipe on touchpad, then...
if(Input.GetAxis ("Mouse X") <= 0f) { moveForward = true; } else moveBack = true;
#if !UNITY_ANDROID || UNITY_EDITOR
if (!SkipMouseRotation)
euler.y += Input.GetAxis("Mouse X") * rotateInfluence * 3.25f;
if(Input.GetMouseButton(0)) // If finger touching touchpad.
{
// If a static or forward swipe on touchpad, then...
if(Input.GetAxis ("Mouse X") <= 0f) { moveForward = true; } else moveBack = true;
#endif
moveInfluence = SimulationRate * Time.deltaTime * Acceleration * 0.1f * MoveScale * MoveScaleMultiplier;
#if !UNITY_ANDROID // LeftTrigger not avail on Android game pad
moveInfluence *= 1.0f + OVRGamepadController.GPC_GetAxis(OVRGamepadController.Axis.LeftTrigger);
#endif
float leftAxisX = OVRGamepadController.GPC_GetAxis(OVRGamepadController.Axis.LeftXAxis);
float leftAxisY = OVRGamepadController.GPC_GetAxis(OVRGamepadController.Axis.LeftYAxis);
if(leftAxisY > 0.0f)
MoveThrottle += ort * (leftAxisY * moveInfluence * Vector3.forward);
if(leftAxisY < 0.0f)
MoveThrottle += ort * (Mathf.Abs(leftAxisY) * moveInfluence * BackAndSideDampen * Vector3.back);
if(leftAxisX < 0.0f)
MoveThrottle += ort * (Mathf.Abs(leftAxisX) * moveInfluence * BackAndSideDampen * Vector3.left);
if(leftAxisX > 0.0f)
MoveThrottle += ort * (leftAxisX * moveInfluence * BackAndSideDampen * Vector3.right);
float rightAxisX = OVRGamepadController.GPC_GetAxis(OVRGamepadController.Axis.RightXAxis);
euler.y += rightAxisX * rotateInfluence;
transform.rotation = Quaternion.Euler(euler);
}