Problems 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.5.1KViews4likes8Comments