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
The current CharacterController3D requires constant updating when adding new features. This proposal proposes to update the behavior in favor of a more dynamic approach.
Signals
Instead of individually creating new signals for each ability inside of the CharacterController3D class, either create them dynamically using the native add_user_signal function, or declare them inside the ability and make the CharacterController3D connect to them dynamically.
Properties
Properties should be ability-bound, thus visible from the editor under the abilities_path array, when selecting the ability. This would however require the abilities to be resources, potentially making this a major undertaking.
Emitters
Emitting signals should be done from within abilities and not on the CharacterController3D.
TL;DR
Each ability should only take care of themselves, independently (or co-dependent of another's ability by connecting to it directly) of others. This allows more complex behavior and abilities being more than just movement related. (ie. interaction handling, etc.)
The text was updated successfully, but these errors were encountered:
This can really be a design problem, at the beginning of the project I strictly followed the rule that child nodes should not know about their parents when developing the character controller.
Reviewing some concepts like the one presented by GDQuest about StateMachine, maybe it could be easily applied here and without the need to put skills as a resource.
However, there is still a way to use new abilities on your character, which is to extend the character script and implement the new abilities, rewriting functions if possible.
The current CharacterController3D requires constant updating when adding new features. This proposal proposes to update the behavior in favor of a more dynamic approach.
Signals
Instead of individually creating new signals for each ability inside of the CharacterController3D class, either create them dynamically using the native
add_user_signal
function, or declare them inside the ability and make the CharacterController3D connect to them dynamically.Properties
Properties should be ability-bound, thus visible from the editor under the
abilities_path
array, when selecting the ability. This would however require the abilities to be resources, potentially making this a major undertaking.Emitters
Emitting signals should be done from within abilities and not on the CharacterController3D.
TL;DR
Each ability should only take care of themselves, independently (or co-dependent of another's ability by connecting to it directly) of others. This allows more complex behavior and abilities being more than just movement related. (ie. interaction handling, etc.)
The text was updated successfully, but these errors were encountered: