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

Improve SeparationRayShape docs #82544

Merged
merged 1 commit into from
Oct 3, 2023

Conversation

MewPurPur
Copy link
Contributor

@MewPurPur MewPurPur commented Sep 29, 2023

Fixes godotengine/godot-docs#8087

How did the "spears falling from the skies" come to be?

Well, I was making this massive PR refactoring physics classes' documentation, and this was a class I hadn't used before. I noticed a few issues in this page. The first was that the documentation said "SeparationRayShape is useful for characters" which seemed so broad. You can use everything for characters except for stuff like worldboundaries and heightmaps. So I started thinking about how to give a more obvious example.

The second issue in the old documentation page, and it was a reoccuring issue, was a performance remark along the lines of "SeparationRayShape is fast, but CircleShape is faster". Again, why would you mention this? It's not like the two shapes are similar to any capacity, no one will replace their SeparationRayShapes for CircleShapes for performance reasons.

Wanting to make these performance remarks more useful, I made a test project and started spawning a lot of physics shapes. Spawning 1000 SeparationRayShapes looked like a "Rain of spears" sorta spell, so it gave me the idea to put this as an example in the docs. I didn't even look into its common use cases 😓

@MewPurPur MewPurPur requested a review from a team as a code owner September 29, 2023 19:16
@akien-mga akien-mga merged commit 19c72e8 into godotengine:master Oct 3, 2023
15 checks passed
@akien-mga
Copy link
Member

Thanks!

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

Successfully merging this pull request may close these issues.

Document that SeparationRayShape2D and SeparationRayShape3D can be used for stairs.
3 participants