Forum Discussion
Schneider21
6 years agoExpert Protege
Teleport Locomotion with only NavMesh
I'm trying to use the TeleportTargetHandlerNavMesh component from the Locomotion example in order to allow teleporting only to valid points on the NavMesh. I have a NavMesh generated, but the targeting still only seems to want to work against colliders, not the NavMesh.
Do I have to have colliders on everything for this targeting script to work, or is there a way to get it to work only using the NavMesh?
Do I have to have colliders on everything for this targeting script to work, or is there a way to get it to work only using the NavMesh?
4 Replies
Replies have been turned off for this discussion
- DondenBoefHonored GuestHi @Schneider21 did you ever figure this out? I cant find anything about it
- Schneider21Expert ProtegeUnfortunately, @DondenBoef, I had so many issues getting the Oculus integration's setups working, I ended up going with my own, more basic controller. It doesn't interact with the Nav Mesh at all, it won't do fade-to-black when intersecting geometry, and it's about as basic as can be in most senses. But at least it doesn't launch me across the map or drop me through the ground every other movement.
That was quite a while back, and I've not been doing any VR work since about October, since I was mostly looking into it for work-related things, and we don't presently have any projects that require it. If I end up coming back to it and figure this issue out, though, I'll absolutely post a solution here. - PutyHonored Guest
Hi, I had a similar issue, you can try my solution.
Create a new MonoBehavior script and in runtime create a Mesh Collider from the NavMesh.
Then you just set that collider as a teleport collider.
I'm using Unity 6 and XR 3[RequireComponent(typeof(TeleportationArea))] public class TeleportationAreaCreator : MonoBehaviour { void Start() { var triangulation = NavMesh.CalculateTriangulation(); var mesh = new Mesh { vertices = triangulation.vertices, triangles = triangulation.indices, }; var mCollider = gameObject.AddComponent<MeshCollider>(); mCollider.sharedMesh = mesh; var teleportationArea = GetComponent<TeleportationArea>(); teleportationArea.colliders.Add(mCollider); } }And after a scene start you can see a new collider, and also you can teleport on it
- MetaStoreHelpCommunity Manager
Hi there, thank you for reaching out.
Please contact our Developer Support team for further assistance. They can be contacted via the following link.
Quick Links
- Horizon Developer Support
- Quest User Forums
- Troubleshooting Forum for problems with a game or app
- Quest Support for problems with your device
Other Meta Support
Related Content
- 8 months ago