Hello!
I have set up all the necessary elements to allow a transition between scenes and it works properly in most cases, yet when i try to set a NavMeshAgent's spawnpoint on a platform, it keeps getting "pulled" to the down first level (bottom floor) of my NavMesh.
Hopefully this picture, shows what i mean:
The agent comes from the ladder and the highlighted transform (with the axis) represents the spawnpoint location. I have already tried to raise the spawnpoint transform a little bit away from the platform but the same ends up happening. My NavMesh also covers the platforms, as it can be seen in the next image:
Has anyone ever experienced this problem? I suspect that it might be due to the way Unity deals with NavMeshes and its agents (the way it automatically aligns the agents with the Mesh when they are close enough), but i am not sure since there's another NavMesh "layer" (from the platform) closer to the spawnpoint and still the agent ends up falling through...
Awaiting for your feedback!
Thanks in advance,
João
LoadLevel() sequencer's spawnpoint
LoadLevel() sequencer's spawnpoint
- Attachments
-
- 2.PNG (199.6 KiB) Viewed 646 times
Re: LoadLevel() sequencer's spawnpoint
Hi,
Does the platform have a collider?
As a test, what if you temporarily remove the character's NavMeshAgent? This should eliminate any questions about the NavMesh system. If the character appears on the platform, then we need to look at NavMesh. If the character still drops down to the lower level, we need to look elsewhere.
Does the platform have a collider?
As a test, what if you temporarily remove the character's NavMeshAgent? This should eliminate any questions about the NavMesh system. If the character appears on the platform, then we need to look at NavMesh. If the character still drops down to the lower level, we need to look elsewhere.
Re: LoadLevel() sequencer's spawnpoint
Hi Toni and thank you for the quick answer
The platform does not have a collider, i generate the NavMesh using the Render Meshes geometry with NavMeshSurface component using NavMeshComponents for runtime NavMesh building (https://github.com/Unity-Technologies/N ... ree/2017.2).
I tried what you suggested and my suspicions were right! It is the NavMeshAgent that is being pulled towards the ground floor NavMesh. This image shows that the LoadLevel() sequencer "teleports" the character to the correct place when this does not have a NavMeshAgent component active. I will try to do the following: create an individual NavMesh applied to the platform in question and then try to connect it with the ground floor one. That way i would have two NavMeshes in the scene, meaning that if the Agent is to be positioned in the closest NavMesh, then it should be positioned in the platform's mesh.
What do you think?
PS: This is clearly not a dialogue system related question anymore so please take your time, there's clearly other priorities.
Best regards,
João
The platform does not have a collider, i generate the NavMesh using the Render Meshes geometry with NavMeshSurface component using NavMeshComponents for runtime NavMesh building (https://github.com/Unity-Technologies/N ... ree/2017.2).
I tried what you suggested and my suspicions were right! It is the NavMeshAgent that is being pulled towards the ground floor NavMesh. This image shows that the LoadLevel() sequencer "teleports" the character to the correct place when this does not have a NavMeshAgent component active. I will try to do the following: create an individual NavMesh applied to the platform in question and then try to connect it with the ground floor one. That way i would have two NavMeshes in the scene, meaning that if the Agent is to be positioned in the closest NavMesh, then it should be positioned in the platform's mesh.
What do you think?
PS: This is clearly not a dialogue system related question anymore so please take your time, there's clearly other priorities.
Best regards,
João
Re: LoadLevel() sequencer's spawnpoint
Hi João,
It's possible that the runtime-generated NavMesh hasn't been built yet when Position Saver moves the character.
You can try increasing the Save System's Frames To Wait Before Apply Data.
The next release adds these features to the Position Saver component:
It's possible that the runtime-generated NavMesh hasn't been built yet when Position Saver moves the character.
You can try increasing the Save System's Frames To Wait Before Apply Data.
The next release adds these features to the Position Saver component:
- NavMeshAgent aware: If character has a NavMeshAgent, uses NavMeshAgent.Warp to position the character. This ensures that it's on a valid NavMesh.
- Option to remember positions separately in every level. Currently Position Saver records the character's position in the most recent level.
Re: LoadLevel() sequencer's spawnpoint
Hi Toni,
I will try to look into that on a later date, thank you so much for the help
I will try to look into that on a later date, thank you so much for the help