Esempio n. 1
0
    /// <summary>
    /// 毎フレームの処理
    /// </summary>
    void Update()
    {
        // PHANTOM のボタン押下状況を更新して取得(GetButtonDown, Up のために必要)
        Phantom.UpdateButtons();

        // 単位を今回のシーン用に変換してオブジェクトに適用
        this.transform.localPosition = HandPosition * UnitLength;
        this.transform.localRotation = HandRotation;

        // ペン先側のボタンが押された
        if (Phantom.GetButtonDown(Buttons.Button1))
        {
            SphereList[0].gameObject.SetActive(false);
        }

        if (Phantom.GetButtonUp(Buttons.Button1))
        {
            SphereList[0].gameObject.SetActive(true);
        }

        // ペン手元側のボタンが押された
        if (Phantom.GetButtonDown(Buttons.Button2))
        {
        }
    }