-
-
Notifications
You must be signed in to change notification settings - Fork 21.3k
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
Fix hardcoded raycast distance in viewport object picking #54369
Conversation
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
I also have a version of this ready for |
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.
Makes sense. I haven't tested this but it looks good.
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.
Good idea, thank you!
Thanks! And congrats for your first merged Godot contribution 🎉 |
happy to help! |
Cherry-picked for 3.5. |
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