Object placed above MRUK furniture "jumps" up/down when pushing right thumbstick
Context Unity + Meta XR Building Blocks. I'm building an AR app (Passthrough + MR Utility Kit). I show a world-space UI dialog above an MRUK table (Canvas in world space, RectTransform placed at the table center + slight lift to sit on the surface -> all via script). Symptom Whenever I push the right controller thumbstick downward, the dialog appears to "jump" ~0.5 m up, and pushing again makes it jump back down. This happened both on the device and in the Simulator. What it actually is It's not the dialog moving. Logging showed Camera.main.transform.position.y toggling between two values (1.047 <-> 1.547), while the dialog's world Y stayed constant.Solved45Views0likes1CommentUnity VR: 1P character not moving with camera when teleporting
I got full body tracking working as per the Meta SDK Movement samples. However, when I add functionality to move the camera rig through teleport locomotion and rotation locomotion, my character's body is not moving and rotating with the camera. How can I make my character move with the camera when teleporting and rotating via the controller?316Views0likes1Comment(Unity) OVRPlayerController- How to get OVRPlayerController to move with OVRCameraRig
I'm working off the standard OVRPlayerController, which has an OVRCameraRig as its child. This is a game where I need thumbstick locomotion (which the OVRPlayerControllerProvides), but I also need roomscale movement. In other words, I need to make sure that when the player moves physically, his in game avatar should also move. Currently whats happening is that when the player moves physically, the OVRcameraRig moves with him, but the parent OVRPlayerContoller does not move. This is an issue because I need my OVRPlayerController to move with my player at all times for proper collision tracking and targeting by Hostile AI. What is the best way to achieve this? Iv'e tried a few ways to make it work but wondering what the cleanest solution is. I'll also need hand tracking for this game. Perhaps I should simply use the AvatarSDK standard avatar and make it a child of a Character Controller for thumb stick movement? thanks for the help!21KViews1like11CommentsHow do I integrate teleportation prefab with Netcode
I'm doing a multiplayer project using Unity Netcode. I'm using the LocomotionControllerInteractorGroup prefab to handle the teleportation, and there is a script from the SDK called PlayerLocomotor that changes the player position. Based on the Netcode tutorial, I should handle movement through NetworkBehavior rather than MonoBehavior, so I duplicated the script and changed it to a NetworkBehavior script, but the modified one is not functioning at all. I attached the modified script below. Could someone give me some hits about how to integrate the locomotion prefab into the NetworkBehavior, please? using System; using System.Collections; using System.Collections.Generic; using Oculus.Interaction; using Oculus.Interaction.Locomotion; using Unity.Netcode; using UnityEngine; public class RPCPlayer : NetworkBehaviour, ILocomotionEventHandler { // Start is called before the first frame update [SerializeField] private Transform _playerOrigin; [SerializeField] private Transform _playerHead; private Action<LocomotionEvent, Pose> _whenLocomotionEventHandled = delegate { }; public event Action<LocomotionEvent, Pose> WhenLocomotionEventHandled { add { _whenLocomotionEventHandled += value; } remove { _whenLocomotionEventHandled -= value; } } protected bool _started; private Queue<LocomotionEvent> _deferredEvent = new Queue<LocomotionEvent>(); protected virtual void Start() { this.BeginStart(ref _started); this.AssertField(_playerOrigin, nameof(_playerOrigin)); this.AssertField(_playerHead, nameof(_playerHead)); this.EndStart(ref _started); } private void OnEnable() { if (_started) { //this.RegisterEndOfFrameCallback(MovePlayer); //It's not available to the NetworkBehavior MovePlayer(); } } private void OnDisable() { if (_started) { _deferredEvent.Clear(); //this.UnregisterEndOfFrameCallback(); } } public void HandleLocomotionEvent(LocomotionEvent locomotionEvent) { _deferredEvent.Enqueue(locomotionEvent); } //[ServerRpc (RequireOwnership = false)] private void MovePlayer() { while (_deferredEvent.Count > 0) { LocomotionEvent locomotionEvent = _deferredEvent.Dequeue(); Pose originalPose = _playerOrigin.GetPose(); MovePlayer(locomotionEvent.Pose.position, locomotionEvent.Translation); RotatePlayer(locomotionEvent.Pose.rotation, locomotionEvent.Rotation); Pose delta = PoseUtils.Delta(originalPose, _playerOrigin.GetPose()); _whenLocomotionEventHandled.Invoke(locomotionEvent, delta); } } private void MovePlayer(Vector3 targetPosition, LocomotionEvent.TranslationType translationMode) { if (translationMode == LocomotionEvent.TranslationType.None) { return; } if (translationMode == LocomotionEvent.TranslationType.Absolute) { Vector3 positionOffset = _playerOrigin.position - _playerHead.position; positionOffset.y = 0f; _playerOrigin.position = targetPosition + positionOffset; } else if (translationMode == LocomotionEvent.TranslationType.AbsoluteEyeLevel) { Vector3 positionOffset = _playerOrigin.position - _playerHead.position; _playerOrigin.position = targetPosition + positionOffset; } else if (translationMode == LocomotionEvent.TranslationType.Relative) { _playerOrigin.position = _playerOrigin.position + targetPosition; } else if (translationMode == LocomotionEvent.TranslationType.Velocity) { _playerOrigin.position = _playerOrigin.position + targetPosition * Time.deltaTime; } } private void RotatePlayer(Quaternion targetRotation, LocomotionEvent.RotationType rotationMode) { if (rotationMode == LocomotionEvent.RotationType.None) { return; } Vector3 originalHeadPosition = _playerHead.position; if (rotationMode == LocomotionEvent.RotationType.Absolute) { Vector3 headForward = Vector3.ProjectOnPlane(_playerHead.forward, _playerOrigin.up).normalized; Quaternion headFlatRotation = Quaternion.LookRotation(headForward, _playerOrigin.up); Quaternion rotationOffset = Quaternion.Inverse(_playerOrigin.rotation) * headFlatRotation; _playerOrigin.rotation = Quaternion.Inverse(rotationOffset) * targetRotation; } else if (rotationMode == LocomotionEvent.RotationType.Relative) { _playerOrigin.rotation = targetRotation * _playerOrigin.rotation; } else if (rotationMode == LocomotionEvent.RotationType.Velocity) { targetRotation.ToAngleAxis(out float angle, out Vector3 axis); angle *= Time.deltaTime; _playerOrigin.rotation = Quaternion.AngleAxis(angle, axis) * _playerOrigin.rotation; } _playerOrigin.position = _playerOrigin.position + originalHeadPosition - _playerHead.position; } #region Inject public void InjectAllPlayerLocomotor(Transform playerOrigin, Transform playerHead) { InjectPlayerOrigin(playerOrigin); InjectPlayerHead(playerHead); } public void InjectPlayerOrigin(Transform playerOrigin) { _playerOrigin = playerOrigin; } public void InjectPlayerHead(Transform playerHead) { _playerHead = playerHead; } #endregion }1.4KViews1like1CommentXR Interaction Toolkit Locomotion Up and Down
Hello, I am trying to implement a 3D Movement (Forward/Backward, Turn left/right, Up/Down)with XR Interaction Toolkit. For Forward and Backward and Turning around, it works easy with XRI Default Input Actions. But the Up/Down Movement doesn't work. Does anybody has a solution? Actually I setup my aircraft, for Left Controller Joy Stick (Up/Down Movement) for Forward/backward and Right Controller Joy Stick (Left/Right Movement) for turning around. I want to setup for Right Controller Joy Stick (Up/Down Movement) for Up/Down in the 3D area. In the Continuous Move Provider script, I tried to change the Forward Source other than main Camera but the Transform remains always the same. Thanks in Advance!2.2KViews1like2CommentsLocomotion and Example Scenes documentation outdated for Meta XR All In One?
Hi. Is anybody using the new Meta XR All In One package yet? I am currently working on a Project and wanted to start from scratch with the latest OVR version, to have the option to implement hand tracking, spacial anchors, etc. at a later point. In the past I mainly used VRIF and XR interaction Toolkit, so I wanted to learn OVR from scratch using the quite good documentation. But now it turns out, that the documentation does not seem to be up to date: I wanted to add locomotion but neither is there an "Active State Finger Visual" on the "Locomotion Hand Interactor Group" nor do I have the example scenes mentioned in this tutorial: https://developer.oculus.com/documentation/unity/unity-isdk-create-locomotion-interactions/ Can anybody tell me how locomotion is done in the latest iteration of the package? Thanks in advance TH1.5KViews1like1CommentOVRPlayerController not working - Hands moving with Camera
I have been at this issue for over a week and I have seen similar posts on the forum that have been left unanswered so please if anyone knows how to solve it kindly let me know how. I'm using OculusInteractionSampleRig and onto it I added as a child or even attempted into the parent folder the OVRPlayerController and all the other necessary components such as Character COntroller, OVR Scene Sample Controller, OVR Debug Info, Character Camera Constraint and mapped the OVRCameraRig. However, when doing so the controllers work fine but the hand prefabs show up in the incorrect position and also move along the camera as I tilt my head or rotate around. This is an Oculus issue as even using the Locomotion Sample scene by Oculus themselves, the controllers are in the correct position but the hands aren't. Kindly find some screenshots of the setup. I really need the OVRPlayerController to work for my school project.2.9KViews1like2CommentsProblems with Locomotion Sample
I am posting these problems and resolutions for the Locomotion Sample here in the hopes it will save someone else time. This is with the Oculus XR Plugin version 1.6.1 and Unity 2020.2.0f1 using a clean URP project, although different combinations may apply. The main problem that took me a while was that teleportation, besides node, was not working with the sample scene. Debugging the code, I found that the layer mask was wrong for collision detection. This is easy to fix, once you know it, under the LocomotionController, for the target handles, ensure the layer mask is set to just Default. It showed as mixed for me on the Nav Mesh and Physical ones. I am not sure if it is corrupted in the package or somehow just in my environment configuration. A few other things that may be helpful to others working with this project: The documentation says teleportation (not nodes) is using Nav Mesh. The current implementation at least as of this version (1.6.1) is default to using the Physics colliders, not the navmesh. This is actually more useful, as player movement is usually based on the Physics engine and Nav Mesh is for AI characters. If you want to try Nav Mesh, get into the LocomotionSampleSupport.cs and change the target handler type in the appropriate setup method. For URP, you will want to upgrade the materials, as usual, however, there are some custom shaders you have to manually replace. In this sample, the node teleportation locations will be invisible if you are using URP. Go to TeleportPoint in the scene and edit the Column Glow material then replace the shader. I used a standard URP > Lit shader with a green color and transparency to make this quickly.5KViews4likes8CommentsController Tracking not working when OVRCameraRig is moved
Hi folks, so I am working on an application for the Quest 2. We use the standard OVR prefabs as a base and have elaborated on their functionality. Until now everything is working fine but today I wanted to the functionality to move the user around by lerping the users position towards another object - basically making the user follow the object. Here the issue arose - when I move the user around, the hands will not update their position anymore. I don't really understand why but I guess the OVRManager/CameraRig stopps updating the hand positions as soon as the user moves around. So is there a way to fix this issue or can someone tell me what is causing this so I can maybe come up with a solution or workaround? Help will be greatly appreciated 🙂Solved4.3KViews0likes2CommentsTeleport Glitch in Oculus "Locomotion" Unity Scene file
While using the Oculus Go on a build of the "Locomotion" scene from the Oculus Integration package, I notice that the "teleport" function will occasionally cause a glitch where I "skip" between teleport portal nodes and end up flown into a different location. When I tried importing the Locomotion package into another scene file with a completely different environment (and with additional teleport nodes and locations duplicated around my environment) I notice that this glitch will occasionally appear again (often times it happens at least 2 out of 6 teleports) and will cause my player character to be "stuck" in its location. I recreated the NavMesh as well and it still happens. Has anyone noticed this glitch? Is this more or less normal for the Oculus Go? Tagged:3KViews1like4Comments