0 votes

Question: How do I get a color of one of the pixels of a texture at a certain position?

I'm building an enhanced Tile Editor professional tool on top of Godot to help with my online role-playing game project. I found after building the game servers that I'm lacking in proper tooling for organizing a Godot-friendly and easily exportable TileMap system that can be loaded into the server for pathfinding logic and server awareness of positions.

thread.software map maker tool cof online

I'll be using the colors to fill in the grid on the left, making it more clear which tiles have been added. The preview render will appear on the left side showing the isometric version of this tile.

Godot version v3.2.1
in Engine by (12 points)

1 Answer

0 votes

You want the color of a single pixel in a Texture, right?

First, get the Image of that Texture and then you can use get_pixel, to get a Color of the specific pixel at x, y

by (120 points)
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 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 webmaster@godotengine.org with your username.