Skip to content

Commit

Permalink
Merge pull request #84261 from KoBeWi/Schrödinger's_colliders
Browse files Browse the repository at this point in the history
Fix rotated tile collision not working at runtime
  • Loading branch information
YuriSizov committed Nov 2, 2023
2 parents da0b1eb + b63533b commit e4ea16e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion scene/2d/tile_map.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3072,8 +3072,12 @@ void TileMap::_internal_update() {
return;
}

// FIXME: This should only clear polygons that are no longer going to be used, but since it's difficult to determine,
// the cache is never cleared at runtime to prevent invalidating used polygons.
if (Engine::get_singleton()->is_editor_hint()) {
polygon_cache.clear();
}
// Update dirty quadrants on layers.
polygon_cache.clear();
for (Ref<TileMapLayer> &layer : layers) {
layer->internal_update();
}
Expand Down

0 comments on commit e4ea16e

Please sign in to comment.