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

Improve/fix picking #26669

Merged
merged 1 commit into from
Mar 6, 2019
Merged

Improve/fix picking #26669

merged 1 commit into from
Mar 6, 2019

Conversation

RandomShaper
Copy link
Member

@RandomShaper RandomShaper commented Mar 5, 2019

  • Acknowledge mouse button events as position tellers (to make picking more solid; for instance, the touch mouse is raised with a mouse unpressed event that may have a more current position)
  • Forget mouse position for physics if touch mouse raised (because the position known as last is no longer meaningful)
  • Remove needless check for mouse over/exit (now there's code to inject an spurious move to ensure repicking if camera/objects have moved) <- @reduz, please confirm my assumption here is valid
  • Restrict 2D mouse over/exit to mouse events (including emulated from touch; true touches shouldn't trigger the signals; they are just sent as events)
  • Assign a device id of -1 to emulated mouse events

Fixes #26460.

Acknowledge mouse button events as position tellers (to make picking more solid; for instance, the touch mouse is raised with a mouse unpressed event that may have a more current position)
Forget mouse position for physics if touch mouse raised (because the position known as last is no longer meaningful)
Remove needless check for mouse over/exit (now there's code to inject an spurious move for cases where camera/objects have moved)
Restrict 2D mouse over/exit to mouse events (including emulated from touch; true touches shouldn't trigger the signals)

Fixes godotengine#26460.
@RandomShaper
Copy link
Member Author

@akien-mga, I think a new beta would be needed after this one, before entering RC.

@akien-mga
Copy link
Member

We don't really have time for another beta though... That's a big change at this stage right before RC. I'll see with @reduz if we take the risk or if it has to wait for 3.1.1.

@RandomShaper
Copy link
Member Author

I can make a test project that ensures everything affected works, to be sure.
There's a small behavior change that would be nice to have in the final release, since it makes 2D and 3D picking work closer to how each other does.
My bad I didn't noticed it earlier. Not much time lately to contribute.

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.

3 participants