mirror of
https://gitlab.com/MaddoScientisto/cirnogodot.git
synced 2026-06-10 07:05:54 +00:00
Fix for barrels not exploding properly in tilemaps
This commit is contained in:
parent
f0b93f467c
commit
0eb6a9140f
5 changed files with 44 additions and 37 deletions
|
|
@ -8,7 +8,9 @@ public static class Tools
|
|||
{
|
||||
if (prefab == null) return null;
|
||||
var newInstance = prefab.Instantiate<T>();
|
||||
node.Owner.CallDeferred("add_child", newInstance);
|
||||
node.GetParent().CallDeferred("add_child", newInstance);
|
||||
// Need to use parent instead of owner because tilemap scenes have no owner
|
||||
//node.Owner.CallDeferred("add_child", newInstance);
|
||||
newInstance.Transform = node.GlobalTransform;
|
||||
newInstance.Position = node.Position;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue