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

Inaccurate baking #40

Closed
gLenczuk opened this issue Feb 15, 2021 · 4 comments
Closed

Inaccurate baking #40

gLenczuk opened this issue Feb 15, 2021 · 4 comments
Assignees
Labels
question Further information is requested

Comments

@gLenczuk
Copy link

Hey! I've setup your NavMeshPlus, but I have problem as you can see on screen:

image

Mesh is really inaccurate. I have 3 tilemaps. Ground, OnGround and Objects. Objects are marked as not walkable. I didn't make any extra steps. Object tilemap has tilemap collider with composite collider.

Could you help me? What can be reason?

@h8man
Copy link
Owner

h8man commented Feb 15, 2021

Hello @gLenczuk

What do you mean inaccurate? How desired NavMesh should look like?

NavMesh show were CENTER of agent can go, so it is around objects on equal distance that is equal to agent radius. Bigger the radius = further distance from objects
https://forum.unity.com/threads/2d-navmesh-pathfinding.503596/page-6#post-6829343
image

@h8man h8man self-assigned this Feb 15, 2021
@h8man h8man added the question Further information is requested label Feb 15, 2021
@gLenczuk
Copy link
Author

I mean, that mesh is too far from obstacles. My agents will be small and with that setup, player can hide near obstacle and agent never will get him.

And I have some enemies, that have to collide with player to deal damage, and thats the problem.

@h8man
Copy link
Owner

h8man commented Feb 15, 2021

@gLenczuk

Change Agent radius to match your need. Distance to object is equal to Agent radius

image
image

@gLenczuk
Copy link
Author

I've changed agent radius and it works. Thank you! I close this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants