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

[3.x] Physics Interpolation - automatic resets for Camera2D and TileMap #80955

Merged
merged 1 commit into from
Sep 18, 2023

Conversation

lawnjelly
Copy link
Member

Adds physics interpolation resets for TileMap and Camera2D.

Notes

  • Camera2D calls NOTIFICATION_RESET_PHYSICS_INTERPOLATION automatically as it inherits this behaviour from CanvasItem. However the camera transform is not yet set at that point, so it makes sense to reset after the initialization has occurred in NOTIFICATION_ENTER_TREE.
  • TileMap needs resetting by quadrant, because there are potentially multiple canvas items in each quadrant.
  • The quadrants are also reset every time they are renewed after making dirty. This will prevent streaking from the origin, however it could potentially need refinement for the case of moving tilemaps. This should probably be done from an MRP issue in a followup, as this is probably a rare use case.

Extra reset required for Camera2D. TileMaps require resetting by quadrant.
@lawnjelly lawnjelly changed the title [3.x] Physics Interpolation - improved automatic resets [3.x] Physics Interpolation - automatic resets for Camera2D and TileMap Aug 24, 2023
@akien-mga akien-mga merged commit 1b4bae5 into godotengine:3.x Sep 18, 2023
13 checks passed
@akien-mga
Copy link
Member

Thanks!

@lawnjelly lawnjelly deleted the fti2d_more_resets branch September 18, 2023 15:08
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.

2 participants