You've already forked godot
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:
@@ -181,6 +181,7 @@ private:
|
||||
void _prepare_tree_bounds(Item *p_root);
|
||||
void _calculate_canvas_item_bound(Item *p_canvas_item, Rect2 *r_branch_bound);
|
||||
|
||||
Transform2D _calculate_item_global_xform(const Item *p_canvas_item);
|
||||
void _finalize_and_merge_local_bound_to_branch(Item *p_canvas_item, Rect2 *r_branch_bound);
|
||||
void _merge_local_bound_to_branch(Item *p_canvas_item, Rect2 *r_branch_bound);
|
||||
|
||||
@@ -227,7 +228,7 @@ public:
|
||||
void canvas_item_set_self_modulate(RID p_item, const Color &p_color);
|
||||
|
||||
void canvas_item_set_draw_behind_parent(RID p_item, bool p_enable);
|
||||
void canvas_item_set_ignore_parent_transform(RID p_item, bool p_enable);
|
||||
void canvas_item_set_use_identity_transform(RID p_item, bool p_enable);
|
||||
|
||||
void canvas_item_set_update_when_visible(RID p_item, bool p_update);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user