Skip to content

Conversation

@Flynsarmy
Copy link
Contributor

@Flynsarmy Flynsarmy commented Nov 20, 2025

Description

This PR adds a tick_mode option to BeehaveTree with the following options:

  • BOTH - ticks on _process and _physics_process
  • PROCESS - ticks on _process
  • PHYSICS - ticks on _physics_process
  • MANUAL - doesn't tick at all. Call $YourTree.tick() to tick the tree.

This PR is backwards compatible as it defaults to BOTH which is the existing functionality. Existing trees will continue working exactly as they always have.

There are a couple of reasons for this change:

  • I want to be able to tick some trees at my own custom rate. The tick_rate option kind of accomplishes this but setting to MANUAL offers the ultimate in flexibility and let's the developer decide exactly how and when the tree ticks
  • The current default of BOTH is kind of dangerous and your unit tests don't cover this. _process runs an unknown number of times per second so tick_rate isn't reliable.

Fixes #389

@Flynsarmy Flynsarmy closed this Nov 20, 2025
@Flynsarmy Flynsarmy deleted the tick_mode branch November 21, 2025 01:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Behaviour Ticker

1 participant