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

NavigationAgent2D emits velocity_computed when disabled #95796

Open
Houtamelo opened this issue Aug 19, 2024 · 2 comments
Open

NavigationAgent2D emits velocity_computed when disabled #95796

Houtamelo opened this issue Aug 19, 2024 · 2 comments

Comments

@Houtamelo
Copy link

Tested versions

  • Reproducible in v4.3.beta3.official [82cedc8]

System information

Godot v4.3.beta3 - Windows 10.0.19045 - GLES3 (Compatibility) - NVIDIA GeForce GTX 1080 Ti (NVIDIA; 32.0.15.5599) - AMD Ryzen 5 3600 6-Core Processor (12 Threads)

Issue description

NavigationAgent2D nodes emits the velocity_computed signal every frame, regardless of its process/physics_process configurations.

The MRP bellow shows this with the agent's process_mode set to DISABLED.

This can be worked around by setting avoidance_enabled = false.

Steps to reproduce

  • Open MRP project
  • Run scene
  • See that velocity computed is printed every frame

Minimal reproduction project (MRP)

navigation_agent_2d_bug.zip

@AThousandShips
Copy link
Member

AThousandShips commented Aug 19, 2024

I think this is part of a larger question and possible confusion over what process_mode actually does, and I think this is a case of that not being documented clearly enough, process_mode isn't a complete "turn everything off" thing but is primarily about the direct processing methods

And as per the documentation:

Notifies when the collision avoidance velocity is calculated. Emitted every update as long as avoidance_enabled is true and the agent has a navigation map.

@smix8
Copy link
Contributor

smix8 commented Aug 19, 2024

The NavigationAgent reacts to the pause notification, NOTIFICATION_PAUSED and NOTIFICATION_UNPAUSED. It checks if the parent node can process while paused.

As AThousandShip mentioned processing mode is not a general pause or disable mode, it just disables the process() or physics_process() function calls.

The NavigationServer also has a dedicated agent_set_paused() function.

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

3 participants