Oculus touchボタンを押したままの時に手を握る等のアニメを再生(握った状態のまま)、
ボタンを離すと握った手を戻すアニメを再生させてもとに戻すということを実現させたいです。
https://qiita.com/ngron/items/d37426e25bae6471c817
http://tiro105.hateblo.jp/entry/2014/06/26/214919
こちら等を参考にスクリプトを作ってみたのですが
ボタンを押しても再生がされないようです。
お手数ですが解決方法をご教示いただけますと幸いです…!
同じような事が出来れば別のアプローチ方法でもなんでも問題ございません。
zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class HandController : MonoBehaviour
{
Animation anim;
// Use this for initialization void Start() { } // Update is called once per frame void Update() { //押したときの処理 if (OVRInput.GetDown(OVRInput.RawButton.A)) { anim.Play("R_hand_pa"); } if (OVRInput.GetDown(OVRInput.RawButton.RIndexTrigger)) { anim.Play("R_hand_1"); } if (OVRInput.GetDown(OVRInput.RawButton.RHandTrigger)) { anim.Play("R_hand_gu"); } if (OVRInput.GetDown(OVRInput.RawButton.LIndexTrigger)) { anim.Play("L_hand_1"); } if (OVRInput.GetDown(OVRInput.RawButton.LHandTrigger)) { anim.Play("L_hand_gu"); } if (OVRInput.GetDown(OVRInput.RawButton.X)) { anim.Play("L_hand_pa"); } //離したときの処理 if (OVRInput.GetUp(OVRInput.RawButton.A)) { anim.Play("R_hand_pa_modori"); } if (OVRInput.GetUp(OVRInput.RawButton.RIndexTrigger)) { anim.Play("R_hand_1_modori"); } if (OVRInput.GetUp(OVRInput.RawButton.RHandTrigger)) { anim.Play("R_hand_gu_modori"); } if (OVRInput.GetUp(OVRInput.RawButton.LIndexTrigger)) { anim.Play("L_hand_1_modori"); } if (OVRInput.GetUp(OVRInput.RawButton.LHandTrigger)) { anim.Play("L_hand_gu_modori"); } if (OVRInput.GetUp(OVRInput.RawButton.X)) { anim.Play("L_hand_pa_modori"); } }
}
zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz
補足情報(FW/ツールのバージョンなど)
Unity 2018.2.10f1
プログラミングが全くできないデザイナーなのでブログ等に記載されていることのコピペだけでどうにか
してきましたがこの件で完全に詰まってしまいました…。
https://qiita.com/ngron/items/d37426e25bae6471c817
こちらで紹介されていましたブレンドシェイプのボタン切り替えはうまくいっていました。
よろしくお願いいたします。
回答1件
あなたの回答
tips
プレビュー