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

[MLA-1880] Raycast sensor interface improvements #5222

Merged
merged 6 commits into from
Apr 6, 2021

Conversation

chriselion
Copy link
Contributor

Proposed change(s)

Public-facing change:

  • Adds RayPerceptionSensor.RayPerceptionOutput, which contains the most recent ray hit information. This can be used to for additional game logic as needed.
  • Adds new fields to RayOutput: StartPositionWorld, EndPositionWorld, ScaledRayLength, and ScaledCastRadius.

Internal changes:

  • Get rid of DebugDisplayInfo - all of its info is now on RayOutput, except for the frame that the results were queried, which is now stored as m_DebugLastFrameCount
  • Raycasts now happen in the Update() call, which always happens before the Write().

Useful links (Github issues, JIRA tickets, ML-Agents forum threads etc.)

Based on feedback from several forum posts:

Forum threads:

Types of change(s)

  • New feature
  • Code refactor

Checklist

  • Added tests that prove my fix is effective or that my feature works
  • Updated the changelog (if applicable)

Other comments

Copy link
Contributor

@dongruoping dongruoping left a comment

Choose a reason for hiding this comment

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

Looks good to me. Verified that the gizmos work fine in editor.

@chriselion chriselion merged commit 0cdd37e into main Apr 6, 2021
@delete-merged-branch delete-merged-branch bot deleted the MLA-1880-raycast-interface branch April 6, 2021 02:15
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 6, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants