public OpenVRController(VRInputDeviceHand hand) { Pointer = new InputDevicePointer(this); Pointer.Activate(); Hand = hand; _buttonInputMap = GenerateButtonInputMap(); _axis1DMap = GenerateAxis1DInputMap(); _axis2DMap = GenerateAxis2DInputMap(); }
/// <summary> /// Initializes the avatar extension. /// </summary> /// <param name="avatar">The <see cref="IVRAvatar"/> the extension is bound to.</param> public void Initialize(IVRAvatar avatar) { mAvatar = avatar; mDevice = VRDevice.Device; mPointer = mDevice.Headset.Pointer; mPointerVisual = m_PointerVisual; if (mPointerVisual == null) { if (mPointer.Transform == transform) { mPointer.Transform = null; } } else { mPointerVisual.Bind(mPointer); mPointer.Transform = mPointerVisual.transform; } ApplyTimedPointerProperties(); Debug.Log("Initialized"); }