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

feat: sdk7 raycast-result support for non-sdk7 entity colliders #5986

Merged
merged 4 commits into from
Nov 30, 2023

Conversation

pravusjif
Copy link
Member

@pravusjif pravusjif commented Nov 27, 2023

Mini refactor to allow returning raycast results with partial data when hitting a non-sdk7-entity collider

Issue: decentraland/sdk#1033

Copilot summary

🤖[deprecated] Generated by Copilot at ec7640a

Fix raycast system to detect hits on SDK6 entities in persistent and portable scenes. Add null check and collision layer mask check for hit entities in ECSRaycastSystem.cs.


QA TEST INSTRUCTIONS

  1. Enter the world at the "portal" scene: https://play.decentraland.org/?NETWORK=mainnet&position=-133%2C-40&explorer-branch=feat%2Fsdk7-raycast-result-support-for-sdk6-colliders&realm=main
  2. Grab the portal gun and move to the 2nd floor of the scene (pressing 'E' you change the portal that will be shot)
1.mp4
  1. Grab the portal gun in the 2nd floor, that will trigger the "portable experience" prompt, accept that so that the new gun can be taken with you to outside that scene
2.mp4
  1. Go to any old scene (this has to be tested on an SDK6 scene, that's why) and shoot the gun... confirm that the portal appears on colliders from old scenes
3.mp4

@pravusjif pravusjif self-assigned this Nov 27, 2023
@pravusjif pravusjif marked this pull request as ready for review November 30, 2023 01:34
@pravusjif pravusjif requested a review from a team as a code owner November 30, 2023 01:34
@pravusjif pravusjif requested a review from popuz November 30, 2023 01:35
Copy link
Collaborator

@popuz popuz left a comment

Choose a reason for hiding this comment

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

LGTM 🟢 minor suggestion

return null;

hit = new RaycastHit();
hit.EntityId = (uint)entity.entityId;
Copy link
Collaborator

Choose a reason for hiding this comment

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

could be simplified to

hit = new RaycastHit { EntityId = (uint)entity.entityId };

Copy link
Contributor

@Ludmilafantaniella Ludmilafantaniella left a comment

Choose a reason for hiding this comment

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

✅ Reviewed and approved. No mayor issues were found

Screen.Recording.2023-11-30.at.09.41.51.mov

@pravusjif pravusjif merged commit a9abf63 into dev Nov 30, 2023
3 checks passed
@pravusjif pravusjif deleted the feat/sdk7-raycast-result-support-for-sdk6-colliders branch November 30, 2023 22:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants