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 hardcoded raycast distance in viewport object picking #54369

Merged
merged 1 commit into from
Nov 1, 2021

Conversation

S0yKaf
Copy link
Contributor

@S0yKaf S0yKaf commented Oct 29, 2021

fix hardcoded raycast distance in viewport object picking

having the raycast distance hardcoded to 10000 caused input events to not be registered in very large 3D scenes.
This resolves the issue by using the cameras far distance instead. Creating the more predictable behavior of "if an object is visible, it will be picked by the viewport."

More info about the issue can be found in #49735

Closes #49735

having the raycast distance hardcoded to `10000` caused input events
to not be registered in very large 3D scenes.

This resolves the issue by using the cameras far distance instead.
Creating the more predictable behavior of if an object is visible,
it will be picked by the viewport.

resolves: godotengine#49735
@S0yKaf S0yKaf requested a review from a team as a code owner October 29, 2021 03:48
@S0yKaf S0yKaf changed the title fix hardcoded raycast distance in viewport object picking #49735 fix hardcoded raycast distance in viewport object picking Oct 29, 2021
@S0yKaf S0yKaf changed the title fix hardcoded raycast distance in viewport object picking Fix hardcoded raycast distance in viewport object picking Oct 29, 2021
@S0yKaf
Copy link
Contributor Author

S0yKaf commented Oct 29, 2021

I also have a version of this ready for 3.x as it's the version I normally use and where I needed this fix.

Copy link
Member

@aaronfranke aaronfranke left a comment

Choose a reason for hiding this comment

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

Makes sense. I haven't tested this but it looks good.

@aaronfranke aaronfranke requested a review from a team October 29, 2021 22:20
@akien-mga akien-mga requested a review from a team November 1, 2021 17:14
@akien-mga akien-mga added cherrypick:3.x Considered for cherry-picking into a future 3.x release topic:core labels Nov 1, 2021
Copy link
Contributor

@pouleyKetchoupp pouleyKetchoupp left a comment

Choose a reason for hiding this comment

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

Good idea, thank you!

@akien-mga akien-mga merged commit 96ce806 into godotengine:master Nov 1, 2021
@akien-mga
Copy link
Member

Thanks! And congrats for your first merged Godot contribution 🎉

@S0yKaf
Copy link
Contributor Author

S0yKaf commented Nov 1, 2021

Thanks! And congrats for your first merged Godot contribution tada

happy to help!

@akien-mga
Copy link
Member

Cherry-picked for 3.5.

@akien-mga akien-mga removed the cherrypick:3.x Considered for cherry-picking into a future 3.x release label Nov 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Hardcoded maximum ray distance when Viewport processes 3d object picking
6 participants