You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-20 14:45:44 +00:00
Subtract body position from shape offset during tileset convert
To be able to adjust tile offset by changing position of StaticBody instead of modifying it maunally from the tres file or by calling a script.
This commit is contained in:
@@ -35,7 +35,6 @@ void TileSetEditor::edit(const Ref<TileSet> &p_tileset) {
|
|||||||
tileset = p_tileset;
|
tileset = p_tileset;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void TileSetEditor::_import_node(Node *p_node, Ref<TileSet> p_library) {
|
void TileSetEditor::_import_node(Node *p_node, Ref<TileSet> p_library) {
|
||||||
|
|
||||||
for (int i = 0; i < p_node->get_child_count(); i++) {
|
for (int i = 0; i < p_node->get_child_count(); i++) {
|
||||||
@@ -113,6 +112,8 @@ void TileSetEditor::_import_node(Node *p_node, Ref<TileSet> p_library) {
|
|||||||
collisions.push_back(collision);
|
collisions.push_back(collision);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
phys_offset -= sb->get_pos();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (collisions.size()) {
|
if (collisions.size()) {
|
||||||
|
|||||||
Reference in New Issue
Block a user