Closed CarsonKompon closed 9 months ago
Was torn between making this a feature request and a bug report. I think a navgen component would be much nicer are be more intuitive to use, but if I'm simply encountering a bug with navgen generation with multiple meshes then I can live with writing a custom navgen component for all my games.
When I modify my NavmeshComponent
test to include ModelCollider
s like you have, calling
Scene.PhysicsWorld.SetupPhysicsFromModel( m.Model, m.Transform.World, PhysicsMotionType.Static );
actually causes sbox to hang for a while. :c
Does that happen for you as well? It does eventually become responsive again though. This is with only 1 ModelCollider
in the entire scene by the way, not dozens or hundreds.
When I modify my
NavmeshComponent
test to includeModelCollider
s like you have, callingScene.PhysicsWorld.SetupPhysicsFromModel( m.Model, m.Transform.World, PhysicsMotionType.Static );
actually causes sbox to hang for a while. :c Does that happen for you as well? It does eventually become responsive again though. This is with only 1
ModelCollider
in the entire scene by the way, not dozens or hundreds.
This is not the case for me. It only hangs for less than a second for me. I tried messing with your navmesh test repo a bit before I made this post. If you make any progress let me know :)
I'm gonna completely re-make the navigation system quite soon.. so will keep this in mind when I do that.
For?
S&Box
What can't you do?
I'm unable to build a world out of ModelRenderers and ModelColliders while using a Navmesh. I can seemingly only use the Map Instance component when using a Navmesh.
How would you like it to work?
It would be nice if there was one component that allowed you to specify either a tag or series of tags and will generate a navmesh based on those objects and have helper functions to interface with it directly (and even update it in real-time if we wanted)
What have you tried?
I tried creating the following component which runs
Scene.PhysicsWorld.SetupPhysicsFromModel
on all ModelColliders tagged with "navmesh":This runs successfully, but the Gizmo drawn in the OnUpdate only shows a navmesh generated for one of the colliders in the hierarchy (or a weird combination of them all? It's hard to tell since some do not line up with the colliders they display...)
The following screenshot shows all 3 ModelColliders selected in the inspector (drawn in green) with the generated navmesh being drawn in Blue (only showing over ground_center_02)
Additional context
No response