3rd Person Camera Relative Movement - Strange Behavior After Build to Quest
I'm working on a simple game where a 3rd person player is controlled by the 2d axis movement on one of the controllers. The movement is camera relative. Depending on the direction the headset is facing, the 3rd person player moves in the appropriate direction. Everything works fine when testing the game in Unity. When I build and run the game on Quest (or Quest 2), I get some unexpected behavior that I can't figure out. On Quest, the 3rd person player immediately starts moving (without any 2d axis movement on the controller). I used adb to stream the actual input, and it appears that the primary2Daxis is throwing off a value (even though I'm not pressing anything). As well, the 3rd person player responds to head rotation differently, almost as if there is head rotation alters local direction, rather than global direction as it should. I've got no idea how to troubleshoot this as the behavior is so different in-engine. Any thoughts on where to begin? I'm using Unity 2019.4 LTS and the XR Interaction Toolkit 0.10. Here is the camera relative movement code: private void movePlayer() { if (targetDevice.TryGetFeatureValue(CommonUsages.primary2DAxis, out Vector2 primary2DAxisValue) && primary2DAxisValue != Vector2.zero) { float X = primary2DAxisValue.x; float Y = primary2DAxisValue.y; Vector3 forward = Vector3.Normalize(Vector3.ProjectOnPlane(mainCamera.transform.forward, Vector3.up)); Vector3 right = Vector3.Normalize(Vector3.ProjectOnPlane(mainCamera.transform.right, Vector3.up)); moveDirection = Vector3.Normalize((X * right) + (Y * forward)); transform.rotation = Quaternion.LookRotation(moveDirection); transform.Translate(moveDirection * speed * Time.deltaTime, Space.World); } }Solved2.2KViews1like1Commentanimating hand mesh using XR Rig?
Wonder if anyone has experience of using the Model section under XR Controller script on the LeftHand/RightHand Controller of the XR Rig? I was hoping it may be possible (as in easy) to use the animated hand mesh from the old Oculus package - tick on Animate Model and it all works :D Currently only supporting Oculus Rift, I just really want animating hands in. Any help, documentation or tutorial links will be appreciated. Thank you.979Views0likes1CommentVRTK vs Unity XR Interaction Toolkit?
I've been hearing a lot lately about VRTK 4 being convoluted and difficult to use. Yet VRTK 3.3 seems to still get praise. Unity XR seems to be popular as well, but potentially without a lot of features VRTK provides. Should I go with some version of VRTK or Unity XR if I'm looking to hopefully easily port to Quest, Vive, Index, and PSVR?5.2KViews0likes5CommentsOculus XR Plugin for Unity 2019.3
I've started reworking my VR interaction system to use Unity's new XR plugins and I'm having some issues with the Oculus one. I'm trying to poll Unity.XR.Oculus.OculusUsages.IndexTouch via Input Device.TryGetFeatureValue() to no avail. I'm able to successfully get proper values for ThumbTouch. Is anyone else having issues with this?639Views0likes0Comments