character-controller icon indicating copy to clipboard operation
character-controller copied to clipboard

Update CharacterController3D for modularity

Open Blade67 opened this issue 1 year ago • 1 comments

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.)

Blade67 avatar May 27 '23 15:05 Blade67