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
I am working on an interoperable gravity standard, with many types of gravity. The goal is to be able to replicate everything in Super Mario Galaxy, and potentially more types of gravity.
Describe the problem or limitation you are having in your project
I would like to be able to implement arbitrary gravity types using Area3D nodes, but Godot only supports directional and point gravity. Godot does not provide any way to extend Area3D with more gravity types.
Describe the feature / enhancement and how it helps to overcome the problem or limitation
Replace the is point boolean with a gravity type enum. The existing boolean doesn't really make sense - even though Godot only has 2 gravity types, there are more than 2 conceivable types, so this should be an enum.
Implement a new gravity type called Target that allows defining the target point for custom gravity as the return value from a callback method that runs for every object in the gravity field every frame. This allows determining different gravity directions for different parts of the gravitational field.
To be clear, most of the heavy lifting would be done by the user-defined callback method. This proposal is about improving the engine code to allow the user to perform advanced customization.
I personally only need this for Area3D, but for consistency we should do the same with Area2D.
Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams
If this enhancement will not be used often, can it be worked around with a few lines of script?
I think this won't be used often, most users are not trying to implement Super Mario Galaxy style games with custom gravity. This could kinda be worked around by manually applying forces to rigid bodies, but that would be bypassing the way the engine usually applies gravity, would not play well with the Area node's space override system, and would take many lines. The goal of this proposal is to make it easier to extend Area's gravity with script.
Is there a reason why this should be core and not an add-on in the asset library?
Area2D and Area3D having gravity is a core feature, we should allow extending it with more gravity types.
The text was updated successfully, but these errors were encountered:
Describe the project you are working on
I am working on an interoperable gravity standard, with many types of gravity. The goal is to be able to replicate everything in Super Mario Galaxy, and potentially more types of gravity.
Describe the problem or limitation you are having in your project
I would like to be able to implement arbitrary gravity types using Area3D nodes, but Godot only supports directional and point gravity. Godot does not provide any way to extend Area3D with more gravity types.
Describe the feature / enhancement and how it helps to overcome the problem or limitation
To be clear, most of the heavy lifting would be done by the user-defined callback method. This proposal is about improving the engine code to allow the user to perform advanced customization.
I personally only need this for Area3D, but for consistency we should do the same with Area2D.
Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams
PR: godotengine/godot#82878 branch: https://github.com/aaronfranke/godot/tree/gravity-target
If this enhancement will not be used often, can it be worked around with a few lines of script?
I think this won't be used often, most users are not trying to implement Super Mario Galaxy style games with custom gravity. This could kinda be worked around by manually applying forces to rigid bodies, but that would be bypassing the way the engine usually applies gravity, would not play well with the Area node's space override system, and would take many lines. The goal of this proposal is to make it easier to extend Area's gravity with script.
Is there a reason why this should be core and not an add-on in the asset library?
Area2D and Area3D having gravity is a core feature, we should allow extending it with more gravity types.
The text was updated successfully, but these errors were encountered: