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

Fix time of impact description in ShapeHits #340

Merged
merged 1 commit into from
Feb 29, 2024
Merged

Fix time of impact description in ShapeHits #340

merged 1 commit into from
Feb 29, 2024

Conversation

Jondolf
Copy link
Owner

@Jondolf Jondolf commented Feb 29, 2024

Objective

As reported by @nezuo on the Bevy Discord, the documentation for the time_of_impact in ShapeHits is inaccurate and contradictory.

How long the shape travelled before the initial hit, i.e. the distance between the origin and the point of intersection.

These are two separate things: "the distance between the origin and the point of intersection" implies that it corresponds to the blue line, but in reality it is the orange line.

TOI visualized

Solution

Clarify the doc comment and remove the incorrect part:

The time of impact (TOI), or how long the shape travelled before the initial hit.

@Jondolf Jondolf added the C-Docs Improvements or additions to documentation label Feb 29, 2024
@Jondolf Jondolf merged commit 4d17473 into main Feb 29, 2024
4 checks passed
@Jondolf Jondolf deleted the fix-toi-docs branch February 29, 2024 08:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-Docs Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant