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

Add clarification about what CharacterBody is used for #10458

Open
JamesC01 opened this issue Jan 1, 2025 · 1 comment
Open

Add clarification about what CharacterBody is used for #10458

JamesC01 opened this issue Jan 1, 2025 · 1 comment
Labels
area:class reference Issues and PRs about the class reference, which should be addressed on the Godot engine repository area:manual Issues and PRs related to the Manual/Tutorials section of the documentation enhancement good first issue topic:physics

Comments

@JamesC01
Copy link
Contributor

JamesC01 commented Jan 1, 2025

Your Godot version:
4.3

Issue description:
I've used Godot casually for a few years, and I'm still a bit uncertain what the recommended usage of CharacterBody is. The name indicates that you should use it for characters, like the player, or enemies that move, but after reading the docs, I'm a bit confused. It seems like it's absolutely usable for stuff other than characters, considering all of the extra collision detection information it gives you, and it doesn't seem to mention that it's only for characters, but I'm still unsure of if it's recommended outside of them, since the name makes it seem like that's all it's for.

If CharacterBody is meant to be used outside of just characters, and intended for anything where you want to have more control over the physics of an object, then I think, outside of a name change, it would be helpful to clarify in the documentation, something like "Despite the name, CharacterBody can be used outside of characters, whenever you want more control over physics objects." Maybe inside one of the little blue notes, or in the main description in the reference pages.

I just feel like it would really help if it was fully clarified. Of course, I only think it should say this if it was actually intended to be used for things other than characters. If there's a better way to implement a custom physics body, then it doesn't need to mention what I said above.

URL to the documentation page (if already existing):
https://docs.godotengine.org/en/stable/tutorials/physics/physics_introduction.html#characterbody2d
https://docs.godotengine.org/en/stable/tutorials/physics/using_character_body_2d.html
https://docs.godotengine.org/en/stable/classes/class_characterbody2d.html
https://docs.godotengine.org/en/stable/classes/class_characterbody3d.html

@tetrapod00
Copy link
Contributor

tetrapod00 commented Jan 1, 2025

In 3.x, this was called a KinematicBody (see also here), which was a more general name. I'm actually not sure why it was renamed to CharacterBody; happened before my time. A rename won't be considered at least for 4.x, and probably not even after that, since it was already changed once. See godotengine/godot-proposals#2184 and godotengine/godot#48908 if you want to dig into the history.

This class is meant to be used for more than just characters. It's meant to be used for any physics bodies you want to manually control.

Clarifying the purpose of CharacterBody with a sentence somewhere seems reasonable to me. The two places you mentioned both seem fine. Feel free to make a PR for it, if you want. We have a tutorial on changing the manual and another one for changing the class reference, which uses a slightly different process since the source of truth is in the main repo, not the docs repo.

@tetrapod00 tetrapod00 added enhancement good first issue area:class reference Issues and PRs about the class reference, which should be addressed on the Godot engine repository area:manual Issues and PRs related to the Manual/Tutorials section of the documentation topic:physics labels Jan 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:class reference Issues and PRs about the class reference, which should be addressed on the Godot engine repository area:manual Issues and PRs related to the Manual/Tutorials section of the documentation enhancement good first issue topic:physics
Projects
None yet
Development

No branches or pull requests

2 participants