Open beicause opened 3 months ago
@lyuma @TokageItLab I saw this and thought it would be good to keep on the todo list
I think that SkeletonModificationStack2D cannot be removed during 4.x, as it is probably already used in a good number of projects.
Of course, SkeletonModifier2D can be added, so we will need to work on implementing SkeletonModifier2D to deprecate SkeletonModificationStack2D and removing them in 5.0 sometime in the future.
I have already made an attempt to add 2d skeleton modifier in https://github.com/beicause/godot/commit/e20709b1d737117278eae010d710dca1a8db050c and ported FABR IK and jiggle. Perhaps physical bone and jiggle can be achieved without the need for modifiers. There is a workaround by using RemoteTransform2D to push the transform of physical body to the corresponding bone.
Impressive, are willing to open a PR with this. Either way I might be interested to help on this.
Describe the project you are working on
A 2D game with heavy use of 2D skeletons.
Describe the problem or limitation you are having in your project
Current 2D skeleton modifications are resources, which is not a good design and has some bugs (see https://github.com/godotengine/godot/issues?q=is%3Aissue+is%3Aopen+skeleton+modification+2d). And it's not convinent to use or extend them since they are nested resources.
Describe the feature / enhancement and how it helps to overcome the problem or limitation
As disscussed in https://github.com/godotengine/godot-proposals/issues/4863 and https://github.com/godotengine/godot/pull/71137
Refactoring the 2D skeleton modifications to Nodes is expected to fix these bugs above and improve usability, paving the way for future improvements in 2D skeleton modifiers.
Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams
Remove SkeletonModificationStack2D, implement SkeletonModifier2D that retrieves its Skeleton2D parent and applies modification, like SkeletonModifier3D and PhysicalBoneSimulator3D. And extend it to implement other modifiers such as IK and 2D physical bones.
If this enhancement will not be used often, can it be worked around with a few lines of script?
No, this needs lots of work if we start from scratch.
Is there a reason why this should be core and not an add-on in the asset library?
Skeleton2D is core.