Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | colludium | |
Old Version | Published before Godot 3 was released. |
Hi. I’m trying to create a Tilemap import script (inspired by this question), but I’ve just reached the edge of my (limited) understanding of the editor. I can create a set of Sprites no problem, but how can I create a StaticBody2D sub-node and collision shape for each Sprite? The linked example demonstrates the creation code that is executed when a bool is clicked and that is what I have been modifying for my needs.
To create a static body 2d I have tried:
var newStaticBody = StaticBody2D.new()
…but nothing is created in the editor (aside from the sprites) and I can’t find a reference in the documentation. I would also like to automatically create a collision rectangle for each tile…
Can you please me offer me some advice on the best way to tackle this? Thanks.
I do not understand, you want to modify a Tileset resource that only have Sprites?
eons | 2017-04-29 16:04