1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-30 16:26:50 +00:00

CPUParticles2D - fix interpolated transforms and culling

1) Physics interpolated particles in global mode are specified in global space. In VisualServer they should therefore ignore local transform.

2) Additionally, the expected final_transform should be passed on to children, rather than the identity transform used on the local item.

3) Local bounds in hierarchical culling are fixed for items using identity transform, by calculating their local bound in local space from the global space particles.
This commit is contained in:
lawnjelly
2023-08-22 09:30:32 +01:00
parent 17b403af81
commit 723632a76a
7 changed files with 80 additions and 19 deletions

View File

@@ -690,7 +690,7 @@ public:
BIND2(canvas_item_set_self_modulate, RID, const Color &)
BIND2(canvas_item_set_draw_behind_parent, RID, bool)
BIND2(canvas_item_set_ignore_parent_transform, RID, bool)
BIND2(canvas_item_set_use_identity_transform, RID, bool)
BIND6(canvas_item_add_line, RID, const Point2 &, const Point2 &, const Color &, float, bool)
BIND5(canvas_item_add_polyline, RID, const Vector<Point2> &, const Vector<Color> &, float, bool)