unity3d:htcvive禁止头显定位,但不限制角度

过山车,导游模式,或者推动玩家前进,禁止玩家移动,但是不限制观察角度

using System.Collections;
using UnityEngine;
using UnityEngine.XR;

public class BanPos : MonoBehaviour {

	// Use this for initialization
	void Start () {

        StartCoroutine(YieldBan());  
    }


    IEnumerator YieldBan()
    {
        yield return new WaitForSeconds(1.0f);
        InputTracking.disablePositionalTracking = true;
    }
}

你可能感兴趣的:(VRTK,HtcVive)