bitbrain / beehave

🐝 behavior tree AI for Godot Engine
https://bitbra.in/beehave
MIT License
1.85k stars 116 forks source link

Manual ticking makes the Debugger behave weirdly #348

Open guicattani opened 2 months ago

guicattani commented 2 months ago

Godot version: 4.3.beta2

Describe the bug When using a manual ticker the Debugger doesn't go all the way to the leaves

To Reproduce Steps to reproduce the behavior:

  1. Set the BehaviorTree to process mode Disabled
  2. Add a manual ticker along the lines of
    
    extends Node

signal tick

func _ready(): _tick()

func _tick(): tick.emit() await get_tree().create_timer(1).timeout _tick()


3. Have a Behavior Tree manually ticked by connecting to the tick signal
```gdscript
extends BeehaveTree 

func _ready():
    super()
    ManualTicker.connect("tick", _on_tick)

func _on_tick():
    self.tick()
  1. Run the scene and open the debugger

Expected behavior The Debugger should work as intended and go through all the branches and leaves

Screenshots

How it's supposed to be Physics ticker (setting the process mode to inherit)

physicstick.webm

vs

How it is Manual ticker

manualticker.webm

Desktop (please complete the following information):