Skip to content

character jitter in PointAndClick2D when movement speed is high🐛 [bug] #53

@Mostafa137511

Description

@Mostafa137511

Describe the bug

when you set the movement_speed too high the Character2D never stops moving and jitters, although NavigationAgent2D is finished navigating.

To Reproduce
Steps to reproduce the behavior:

  1. make Character2D move with the simple example the creator provided but set the speed high, for example 2000.
  2. character2D keeps moving

Expected behavior
i expected it to stop and not jitter

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: windows 11
  • Godot version 4.2.2

Additional context
i solved the problem with editing this part of code in the PointAndClick2D script (edited part in the qoutes):
func _physics_process(delta: float) -> void:
if not Engine.is_editor_hint() and automatic_movement "and !navigation_agent.is_navigation_finished()":
move_to_clicked_position()

Reproducible project
Attach a reproducibile project. Otherwise I'll look into the issue when I can.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions