0 votes

I have created a TileSet with editor UI, with 4 Atlas Tiles. I have a Script that inherits Node2D (but that's not enforced).

I want to draw a single tile from one of four Atlas Tiles. How would I do this, other than taking a texture tile_get_texture, then getting tile boundaries tile_get_region, autotile_get_size, tile_get_texture_offset, and then somehow (with Sprite or the TextureRect) cropping the texture with the boundaries?

in Engine by (16 points)

1 Answer

0 votes

You are trying to do it by code, maybe you can use the built tileset editor?


by (376 points)
  1. I am already using a tileset editor to cut a texture into the tiles. I now need to extract those tiles from the tileset.
  2. I am implementing a procedural generation algorithm, so I don't think I can use an editor UI for that.
Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected] with your username.