-
Notifications
You must be signed in to change notification settings - Fork 65
Add collisionShapeId to RayIntersectionT for raycast hit entity ident… #879
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
Changes from 2 commits
81ec48a
b582816
5d0e93f
8b5dcf7
055ceb6
88c6434
91dffd3
ab5d316
83b924c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -36,10 +36,19 @@ auto GetRayIntersectionFromLastStepFeature::World< | |
| this->template Interface<GetRayIntersectionFromLastStepFeature>() | ||
| ->GetRayIntersectionFromLastStep(this->identity, _from, _to); | ||
|
|
||
| RayIntersection intersection{result.point, result.fraction, result.normal}; | ||
| RayIntersection intersection{ | ||
| result.intersection.point, | ||
| result.intersection.fraction, | ||
| result.intersection.normal}; | ||
|
||
|
|
||
| RayIntersectionData output; | ||
| output.template Get<RayIntersection>() = std::move(intersection); | ||
|
|
||
| auto *extraData = result.extraData.template Query<ExtraRayIntersectionData>(); | ||
| if(extraData) | ||
| { | ||
| output.template Get<ExtraRayIntersectionData>() = std::move(*extraData); | ||
| } | ||
| return output; | ||
| } | ||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can check me on this, but I think the
extraDatawill just be empty if there is no shape that was hit.Also, we already have an value for an invalid id, so I recommend using that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done !