-
-
Notifications
You must be signed in to change notification settings - Fork 21.5k
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
Update tilemap physics' World2D on reparenting #84968
Conversation
Co-authored-by: Alon Ran <[email protected]>
b2973ab
to
dae6416
Compare
@@ -686,26 +686,30 @@ void TileMapLayer::_physics_update() { | |||
|
|||
void TileMapLayer::_physics_notify_tilemap_change(TileMapLayer::DirtyFlags p_what) { | |||
Transform2D gl_transform = tile_map_node->get_global_transform(); | |||
PhysicsServer2D *ps = PhysicsServer2D::get_singleton(); |
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.
Don't know that storing the server in a variable for three uses is necessary and makes the code harder to read IMO (leftover from the original PR and was planning to comment the same there)
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.
I tend to agree it's not necessary, but it doesn't seem to be a bad change either, so I'm fine merging as is (and mostly in a hurry to get the master
branch somewhat RC1 ready ;)).
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.
Don't know that storing the server in a variable for three uses is necessary and makes the code harder to read IMO (leftover from the original PR and was planning to comment the same there)
It's commonly done in the TileMap codebase (using ps
, rs
or ns
for the different servers), so it's more or less consistent with what we already have I believe. I think anyone familiar with the TileMap-related code should be familiar with this, so it's does not hurt readability much I think. But yeah, that's debatable.
Thanks @NewDefectus and @groud! |
Supersedes #84757
Fixes #83291
This is the same fix as in #84757, with the changes I requested. Made this superseding PR to have this included in RC1