protected override void CreateSensorTransform() { CreateSensorTransform("Mixed Reality HMD", headTarget.head2eyes, Quaternion.identity); WindowsMRHmdComponent mixedRealityHmd = sensorTransform.GetComponent <WindowsMRHmdComponent>(); if (mixedRealityHmd == null) { sensorTransform.gameObject.AddComponent <WindowsMRHmdComponent>(); } }
public override void Start(HumanoidControl _humanoid, Transform targetTransform) { base.Start(_humanoid, targetTransform); tracker = headTarget.humanoid.mixedReality; if (tracker == null || !tracker.enabled || !enabled) { return; } SetSensor2Target(); CheckSensorTransform(); sensor2TargetPosition = -headTarget.head2eyes; if (sensorTransform != null) { mixedRealityHmd = sensorTransform.GetComponent <WindowsMRHmdComponent>(); if (mixedRealityHmd != null) { mixedRealityHmd.StartComponent(tracker.trackerTransform); } } }