Skip to content

[bugfix] - ray distance scaling#2022

Merged
aclegg3 merged 1 commit intomainfrom
ray-dist-bugfix
Mar 3, 2023
Merged

[bugfix] - ray distance scaling#2022
aclegg3 merged 1 commit intomainfrom
ray-dist-bugfix

Conversation

@aclegg3
Copy link
Copy Markdown
Contributor

@aclegg3 aclegg3 commented Mar 1, 2023

Motivation and Context

RayHitInfo.rayDistance should be in units of ray length. In other words, rayDistance==1 indicates a world distance of length(ray.direction). The hit fraction from Bullet is already scaled this way, so additional scaling is not necessary, but was being done erroneously.

Because no tests or downstream code had the audacity to use non-unit ray directions, this bug was not caught until now.

How Has This Been Tested

Added a test.

Types of changes

  • Docs change / refactoring / dependency upgrade
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have completed my CLA (see CONTRIBUTING)
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@aclegg3 aclegg3 requested review from 0mdc and jturner65 March 1, 2023 20:13
@facebook-github-bot facebook-github-bot added the CLA Signed Do not delete this pull request or issue due to inactivity. label Mar 1, 2023
Copy link
Copy Markdown
Contributor

@0mdc 0mdc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@aclegg3 aclegg3 merged commit 21cc9a8 into main Mar 3, 2023
@aclegg3 aclegg3 deleted the ray-dist-bugfix branch March 3, 2023 15:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed Do not delete this pull request or issue due to inactivity.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants