###HTC VIVEのコントローラーの加速度を取得してその数値によってシーンの切り替えをしたい!
発生している問題・エラーメッセージ
Assets/switch1.cs(18,10): error CS0019: Operator `>' cannot be applied to operands of type `UnityEngine.Vector3' and `string'
該当のソースコード
C#
1using System.Collections; 2using System.Collections.Generic; 3using UnityEngine; 4using UnityEngine.SceneManagement; 5using Valve.VR.InteractionSystem; 6 7public class switch1 : MonoBehaviour { 8 9 // Use this for initialization 10 void Start () { 11 12 } 13 14 // Update is called once per frame 15 void Update () { 16 VelocityEstimator VE = GetComponent<VelocityEstimator>(); 17 18 if (VE.GetAccelerationEstimate() >= "10,0,0") { 19 SceneManager.LoadScene ("scene1"); 20 } 21 } 22}
試したこと
ここに問題に対して試したことを記載してください。
補足情報(FW/ツールのバージョンなど)
ここにより詳細な情報を記載してください。
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2019/04/26 09:22