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 Physics Picking captured Object initialization #78383

Merged
merged 1 commit into from
Jul 12, 2023

Conversation

Sauermann
Copy link
Contributor

@Sauermann Sauermann commented Jun 17, 2023

Initialize variables when a captured object is known.

Without this initialization, the following lines will fail, resulting in some events not being sent to the collision object:

if (last_id.is_valid()) {
if (ObjectDB::get_instance(last_id) && last_object) {

MRP: godotengine/godot-demo-projects#925

  1. Drag one of the sliders.
  2. Drop while moving the mouse (sometimes the Mouse-button-up event is not registered)

Initialize variables when a captured object is known.
@RandomShaper
Copy link
Member

It's a bit hard to assess for me. I trust the changes enough to be put in the wild, but I can't confidently give them greenlight for 4.1.

@YuriSizov YuriSizov modified the milestones: 4.1, 4.2 Jun 20, 2023
Copy link
Contributor

@YuriSizov YuriSizov left a comment

Choose a reason for hiding this comment

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

Then let's merge it early in 4.2. And if it proves to be a safe fix, we can cherry-pick it.

@YuriSizov YuriSizov merged commit 223370c into godotengine:master Jul 12, 2023
@YuriSizov
Copy link
Contributor

Thanks!

@Sauermann Sauermann deleted the fix-physics-object-init branch July 12, 2023 17:26
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.

4 participants