Пример #1
0
    private void Rotate()
    {
        float timeSpeed = rotationSpeed * Time.deltaTime * Mathf.Rad2Deg;

        rotation = new Vector2(joystickManager.GetRs().y *timeSpeed, joystickManager.GetRs().x *timeSpeed);
        transform.Rotate(rotation.x, rotation.y, 0);
        transform.rotation = Quaternion.Euler(transform.eulerAngles.x, transform.eulerAngles.y, 0);
    }