void FixedUpdate() { CameraBot.UpdatePosition( GetDirection.x, GetDirection.y, GetRotate.x, GetRotate.y, GetZoom); }
void FixedUpdate() { Vector2 rotate = new Vector2( Input.acceleration.x * ((flipX) ? 1f : -1f), Input.acceleration.y * ((flipY) ? 1f : -1f)); if (rotate.sqrMagnitude > 1f) { rotate.Normalize(); } Vector2 move = new Vector2( ((Horizontal.Length > 0) ? Input.GetAxis(Horizontal) : 0f), ((Vertical.Length > 0) ? Input.GetAxis(Vertical) : 0f) ); CameraBot.UpdatePosition(move.x, move.y, rotate.y, rotate.x, 0f); }