Animated nav mesh? Or always static? #2878
-
Is the nav mesh always static? Or can a piece of it be animated? We are thinking about a design that is more vertical, as if it's a multi-level high-rise. But we want players to be able to easily loop b/w the beginning and end so an animated looping elevator platform or ladder would be really nice (or even just a slow parachuting fall from the top). Has anyone seen or attempted anything like this? Definitely willing to hack toward it if anyone has pointers. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Hmm, could be tricky... I guess there is no reason you couldn't just mutate the navmesh data itself to make these moving platforms (we use https://github.com/donmccurdy/three-pathfinding for navmesh handling).. I think the character controller would mostly handle that correctly if you didn't move it too quickly, though I suspect you would see some jittering (not atypical in games on moving platforms). I could also imagine 2 waypoint based solutions:
The other issue you are going to run into with the moving platform approach is that animations are currently not networked, so without some additional work to sync them up, you would see people floating in the air if they were not synced up with your local representation of the elevator position. |
Beta Was this translation helpful? Give feedback.
-
I'm trying to prove out updating the nav mesh at runtime in the Hubs client. I've tried a few different approaches, but the most direct would seem to be calling the A-Frame system nav.loadMesh() and passing in a new Mesh (a simple plane for a test):
This runs w/o error and it has some effect - my character basically goes into camera/flying mode and teleportation stops working. So the existing nav mesh seems to be removed but there is no plane in its place. Do I have to reattach players to the new nav mesh after loading somehow? Any idea, @netpro2k ? |
Beta Was this translation helpful? Give feedback.
Hmm, could be tricky... I guess there is no reason you couldn't just mutate the navmesh data itself to make these moving platforms (we use https://github.com/donmccurdy/three-pathfinding for navmesh handling).. I think the character controller would mostly handle that correctly if you didn't move it too quickly, though I suspect you would see some jittering (not atypical in games on moving platforms).
I could also imagine 2 waypoint based solutions: