Skip to content

Choose measurement strategy on time nodes #319

@Remi123

Description

@Remi123

Godot version: 4.2

Describe the bug
Both delayer and cooldown update their internal timer using get_physics_process_delta_time() on each tick. However, if you update your tree every 20 frame just like I do, this mean that it take 20 time the desired amount.

There is a few ways to make it tick-independent. I would store the time at before_run, then each tick compare if the difference betwen now and then is higher than the desired amount. But you could also create_timer.

To Reproduce
Add a Cooldown or delay node, set a wait_time to 1.
set the behavior tree tick rate to 20.
Wait 20 second to see the desired behavior.

Expected behavior
waiting 1 second

Metadata

Metadata

Assignees

No one assigned

    Labels

    🍯 featureA new addition to this addon.🐝 v3Relates to work for Beehave V3

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions