beehave icon indicating copy to clipboard operation
beehave copied to clipboard

Add delta time in tick() function

Open Nrosa01 opened this issue 2 years ago • 2 comments

Is your feature request related to a problem? Please describe. The only way to get delta time in tick() function is action nodes is actor.get_physics_process_delta_time() which is annoying. Also user won't know at first if this is running in the physics process or the normal process.

Describe the solution you'd like Add delta (time) parameter, to tick function. It can be passaed in beehave_tree.gd#_physics_process(delta: float) function at line 116

func tick(actor: Node, blackboard: Blackboard, delta: float) -> int:
	pass

This is also useful for condition nodes that needs to create a timer you want to manually control instead of using get_scene_tre().create_internal_tiner()...

Describe alternatives you've considered I thought about a default blackboard having it but that didn't make sense

Additional context It's troublesome not knowing at first how tick runs. I'll make another issue for this. I'll try to make also a PR to fix this issue tomorrow

Nrosa01 avatar Sep 24 '23 20:09 Nrosa01

No more updating the delta time in the blackboard!

lostptr avatar Sep 24 '23 22:09 lostptr

Created a PR here

Nrosa01 avatar Sep 25 '23 11:09 Nrosa01