top of page

オブジェクト回転

    void Update () {
        if (Input.GetKey ("up")) {
            transform.Rotate (1f,0,0);
        }
        if (Input.GetKey ("down")) {
            transform.Rotate (-1f,0,0);
        }
        if (Input.GetKey ("right")) {
            transform.Rotate (0,1f,0);
        }
        if (Input.GetKey ("left")) {
            transform.Rotate (0,-1f,0);
        }
    }

bottom of page