You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If possible, I think that states should provide signals for _input and _unhandled_input, similar to how there are signals for _process and _physics_process. This change would allow for slightly more optimal code since the input functions only fire whenever there's a change in input, whereas the process functions fires every frame.
Currently, my workaround for this is to, in my player's _unhandled_input function, emit a state event (e.g., "interact") and then have a signal handler, which is connected to the event_received for all relevant states, handle the event appropriately. This works fine, but is a bit hacky and you do lose all information about the input event itself.
P.S. I've only just started using godot-statecharts and it has already been so useful for me! Thanks a lot for the awesome plugin!
The text was updated successfully, but these errors were encountered:
If possible, I think that states should provide signals for
_input
and_unhandled_input
, similar to how there are signals for_process
and_physics_process
. This change would allow for slightly more optimal code since the input functions only fire whenever there's a change in input, whereas the process functions fires every frame.Currently, my workaround for this is to, in my player's
_unhandled_input
function, emit a state event (e.g., "interact") and then have a signal handler, which is connected to theevent_received
for all relevant states, handle the event appropriately. This works fine, but is a bit hacky and you do lose all information about the input event itself.P.S. I've only just started using godot-statecharts and it has already been so useful for me! Thanks a lot for the awesome plugin!
The text was updated successfully, but these errors were encountered: