Jump to content

lawwong

Employee
  • Content Count

    5
  • Joined

  • Last visited

Community Reputation

2 Neutral

About lawwong

  • Rank
    Contributor

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Hi @AlGolden The unexpected behavior for you is caused by this: In our default setup in our prefab & example scene, RenderModelHook (visible controller model) will be switched off only if device is disconnected. ColliderEventCaster (invisible controller grabber) will be switched off if device is disconnected or lost tracking. So when your Rift controller or Vive controller lost tracking (but still connected), their model are still visible but the grabber is disabled (thus grabbed object is released). But for Focus Plus controller, its hard to lost its t
  2. Do you mean you want to rotate camera root around HMD? public static void RotateAroundHMD(Transform vrOrigin, Transform hmd, Quaternion rot) { vrOrigin.position = rot * (vrOrigin.position - hmd.position) + hmd.position; vrOrigin.rotation = rot * vrOrigin.rotation; } public static void OnSomeRightTurnEventOcurred() { // Turn right around Y axis for 45 degree RotateAroundHMD(vrOrigin, hmd, Quaternion.Euler(new Vector3(0f, 45f, 0f))); }
  3. Hi @FrancescoFontana About using Wave SDK via VIU, after you installed it into your project, first please make sure the Wave SDK support is enabled in the "Edit > Preferences > VIU Settings" configuration window. After that, you can take a look at the example scenes in HTC.UnityPlugin/ViveInputUtility/Examples folder. Briefly, the stereo camera is handled by the VIU script - VRCameraHook, so it can be crossed VR platforms.
  4. Its a historical issue... At first, ViveInput.GetPress only takes HandRole perameter. After the Role Binding Update, custom role enum is supported. I tried to add ViveInput.GetPress<TRole>(TRole role, ...) but the methods signature is ambiguous to ViveInput.GetPress(HandRole role, ...) because Unity was using older C# version. (template specialization only supported in newer C# version) It may not cause compile error if I just replace ViveInput.GetPress(HandRole role, ...) to ViveInput.GetPress<TRole>(TRole role, ...) but technically it changes the signature and also auto-comp
  5. Hi, Following sample should do the work. Also it's cross platform. using HTC.UnityPlugin.Vive;using UnityEngine;public class SwipeSample : MonoBehaviour, IViveRoleComponent{ [serializeField] private ViveRoleProperty m_viveRole = ViveRoleProperty.New(HandRole.RightHand); [serializeField] private float m_swipeThreshold = 0.75f; private Vector2 m_downAxis; public ViveRoleProperty viveRole { get { return m_viveRole; } } private void OnEnable() { ViveInput.AddListener(m_viveRole, ControllerButton.PadTouch, ButtonEventType.Down, OnPadDown); ViveInput.AddListe
×
×
  • Create New...