Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Display the center of mass for RigidBodies in the editor #2579

Open
Calinou opened this issue Apr 9, 2021 · 0 comments
Open

Display the center of mass for RigidBodies in the editor #2579

Calinou opened this issue Apr 9, 2021 · 0 comments

Comments

@Calinou
Copy link
Member

Calinou commented Apr 9, 2021

See also #945.

Describe the project you are working on

The Godot editor 🙂

Describe the problem or limitation you are having in your project

Depending on how you create the collision shape(s), the RigidBody's center of mass can end up in an unexpected location. There is currently no way to debug this in the editor, or while the project is running with the Debug > Visible Collision Shapes option.

Describe the feature / enhancement and how it helps to overcome the problem or limitation

Add a way to display the RigidBody center of mass in the editor, at run-time, or ideally both. Being able to view the center of mass at run-time would be useful for those doing procedural generation.

Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams

This can be done by adding a gizmo for RigidBodies in the 2D and 3D editors. To display the center of mass, we can use a bunch of lines similar to the Position2D and Position3D node representations (except with a different color and opacity).

If this enhancement will not be used often, can it be worked around with a few lines of script?

This can be implemented with an editor plugin, but this should probably be part of core for better usability.

Is there a reason why this should be core and not an add-on in the asset library?

This can likely be implemented with an add-on, but it's not particularly convenient to have to install an add-on to do this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant