Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Agent not snapping to Navmesh on Spawn #222

Closed
Mashimaro7 opened this issue Nov 18, 2024 · 2 comments
Closed

Agent not snapping to Navmesh on Spawn #222

Mashimaro7 opened this issue Nov 18, 2024 · 2 comments

Comments

@Mashimaro7
Copy link

I'm not sure what's going on, i can visibly see the agent is on a navmesh... but it's giving an error saying set destination can only be called on an active agent on a navmesh.
image
If i drag the exact same prefab on this spot and press start, it will be on the navmesh and set it's destination.
I've tried using NavMesh.SamplePosition and then setting the destination to the hit.position, it gets a position then gives the same error(?!)
I can see the agent component is active in the heirarchy so that's not the issue... Any idea what could be causing this? Am i not assigning it to the navmesh properly or something?

@h8man
Copy link
Owner

h8man commented Nov 18, 2024

Hello,

I didn't encounter this issue, also I don't have test scene to reproduce.
Is it the same issue? #169

@Mashimaro7
Copy link
Author

@h8man
Thanks for the response, yes that seems to be the same issue. Disabling and reenabling the agent fixes the issue. Strange.

@h8man h8man closed this as completed Dec 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants