1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-06 12:20:30 +00:00

Revert "Take CanvasLayer transform into account for 2D physics"

This reverts commit 4839e5f6d9.

Fixes #21289.
This commit is contained in:
Rémi Verschelde
2018-08-23 21:49:24 +02:00
parent b90dff787c
commit ab3716bd46
6 changed files with 30 additions and 38 deletions

View File

@@ -29,7 +29,6 @@
/*************************************************************************/
#include "canvas_layer.h"
#include "scene/2d/canvas_item.h"
#include "viewport.h"
void CanvasLayer::set_layer(int p_xform) {
@@ -63,24 +62,6 @@ void CanvasLayer::_update_xform() {
transform.set_origin(ofs);
if (viewport.is_valid())
VisualServer::get_singleton()->viewport_set_canvas_transform(viewport, canvas, transform);
if (!is_inside_tree())
return;
_notify_xform(this);
}
void CanvasLayer::_notify_xform(Node *p_node) {
for (int i = 0; i < p_node->get_child_count(); i++) {
CanvasItem *ci = Object::cast_to<CanvasItem>(p_node->get_child(i));
if (ci) {
ci->_notify_transform(ci);
} else {
_notify_xform(p_node->get_child(i));
}
}
}
void CanvasLayer::_update_locrotscale() {