public override void OnActivated() { m_prevTrackingSpace = XRDevice.GetTrackingSpaceType(); UpdateTrackingSpaceType(); EnsureDeviceStateLength(16); m_index2nodeID = new ulong[GetDeviceStateLength()]; m_index2nodeValidity = new bool[GetDeviceStateLength()]; m_index2nodeTouched = new bool[GetDeviceStateLength()]; }
protected virtual void Update() { if (XRDevice.GetTrackingSpaceType() != TrackingSpaceType.RoomScale && forceRoomScaleTracking) { XRDevice.SetTrackingSpaceType(TrackingSpaceType.RoomScale); } if (XRDevice.GetTrackingSpaceType() != TrackingSpaceType.Stationary && !forceRoomScaleTracking) { XRDevice.SetTrackingSpaceType(TrackingSpaceType.Stationary); } }
public override void OnActivated() { #pragma warning disable CS0618 m_prevTrackingSpace = XRDevice.GetTrackingSpaceType(); #pragma warning restore CS0618 UpdateTrackingSpaceType(); EnsureDeviceStateLength(16); m_index2nodeID = new ulong[GetDeviceStateLength()]; m_index2nodeValidity = new bool[GetDeviceStateLength()]; m_index2nodeTouched = new bool[GetDeviceStateLength()]; }
public override void OnActivated() { m_prevTrackingSpace = XRDevice.GetTrackingSpaceType(); UpdateTrackingSpaceType(); EnsureDeviceStateLength(16); m_index2nodeID = new ulong[GetDeviceStateLength()]; m_index2nodeValidity = new bool[GetDeviceStateLength()]; m_index2nodeTouched = new bool[GetDeviceStateLength()]; if (s_nodeType2DeviceClass == null) { s_nodeType2DeviceClass = new EnumArray <XRNode, VRModuleDeviceClass>(VRModuleDeviceClass.Invalid); s_nodeType2DeviceClass[XRNode.Head] = VRModuleDeviceClass.HMD; s_nodeType2DeviceClass[XRNode.RightHand] = VRModuleDeviceClass.Controller; s_nodeType2DeviceClass[XRNode.LeftHand] = VRModuleDeviceClass.Controller; s_nodeType2DeviceClass[XRNode.GameController] = VRModuleDeviceClass.Controller; s_nodeType2DeviceClass[XRNode.HardwareTracker] = VRModuleDeviceClass.GenericTracker; s_nodeType2DeviceClass[XRNode.TrackingReference] = VRModuleDeviceClass.TrackingReference; } }
public override void OnActivated() { m_prevTrackingSpace = XRDevice.GetTrackingSpaceType(); UpdateTrackingSpaceType(); }