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

NavigationObstacle3D node not behaving as in earlier stable version 4.0.3 #83625

Closed
Shigewara opened this issue Oct 19, 2023 · 11 comments
Closed

Comments

@Shigewara
Copy link

Godot version

4.2.beta2

System information

Godot v4.2.beta2 - Windows 10.0.22621 - Vulkan (Forward+) - integrated Intel(R) Iris(R) Xe Graphics (Intel Corporation; 30.0.100.9864) - 11th Gen Intel(R) Core(TM) i7-1165G7 @ 2.80GHz (8 Threads)

Issue description

2023-10-19.17-47-46.mp4

Steps to reproduce

Having a functional NavMesh and a testunit coded to move to mouse along a baked Navigation Mesh over a plane mesh with a trimesh static body created, as in the linked video.

  1. Create a NavigationObstacle3D node.
  2. Set radius to 2 meters.
  3. Create a Node3D and make this the parent of the NavigationObstacle3D node.
  4. The testunit will not avoid the obstacle, and only do so once the Node3D has been moved on the y-axis to approximately 0.25 meters

Minimal reproduction project

N/A

@AThousandShips
Copy link
Member

When is "before"? What version are you comparing to?

@Shigewara
Copy link
Author

Right. Before was in this case Godot 4.0.3 rc1

@AThousandShips
Copy link
Member

AThousandShips commented Oct 19, 2023

Does this behavior exist in a stable version, like 4.0.2 or 4.0.3 (or 4.0.4 or 4.1.2, which are supported versions), 4.0.3.rc1 is a development release and doesn't represent stable behavior

@smix8
Copy link
Contributor

smix8 commented Oct 19, 2023

Whatever offset or scale change is hidden there on the NavigationObstacle3D node:
tc

@Shigewara
Copy link
Author

Shigewara commented Oct 19, 2023

It had been uniformely scaled from 1 to 2. Changing that transform change back to default still leaves the same issue. Nothing changed.
I made a simple test project in 4.0.3 stable and this issue does not exist in this stable version.
Edit. Then opening that same test project in 4.2 now the problem is there again. The same project as created in 4.0.3.

@Shigewara
Copy link
Author

4.0.3 Bug Test.zip

@Shigewara
Copy link
Author

Shigewara commented Oct 19, 2023

This bug also persist if after opening "4.0.3 bug test" project in 4.2 you change radius of NavigationObstacle3D to 1 meter

@Shigewara Shigewara changed the title NavigationObstacle3D node not behaving as before NavigationObstacle3D node not behaving as in earlier stable version 4.0.3 Oct 19, 2023
@smix8
Copy link
Contributor

smix8 commented Oct 20, 2023

There is a bug with the NavigationObstacle3D height setter. Until fixed change the height of the obstacle slightly from the default value or use the NavigationServer3D.obstacle_set_height() function to set it directly.

That said the new avoidance introduced with 4.1 changed a lot so you might want to read up on that especially with the new documentation for NavigationAgents and NavigationObstacles.

The biggest change is that the new avoidance by default used a real 2D avoidance now for all agents. The 3D avoidance still exists but is now a real 3D avoidance that expects movement in all directions, not limited to a flat plane. You can toggle between those two with the use_3d_avoidance property.

@smix8 smix8 added bug and removed needs testing labels Oct 20, 2023
@Shigewara
Copy link
Author

Ok. Thanks for the advice! I'll look up on that documentation.

@smix8
Copy link
Contributor

smix8 commented Oct 21, 2023

Closing as the two fix prs have been merged.

@ChildLearningClub
Copy link

ChildLearningClub commented Nov 10, 2023

4.2 beta 5 . I believe something may have broken again? I have tried changing heights and settings, but the NavigationObstacle3D is not avoided despite NavigationAgent3D avoidance enabled setting On.

Minimal reproduction project

Edit: It is working, In my project I did not use the example scripts from the docs as I should have. Utilizing the scripts things work as expected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants