+1 vote

This seems like a basic feature the engine should have? Why can't I have a flashing block or a water animated block in my tile map? Is there somewhere I can submit this as a feature request?

in Engine by (39 points)

3 Answers

+5 votes
Best answer

Godot 3.1 includes AnimatedTexture for just such purposes.

by (21,712 points)
selected by

"Also, it doesn’t support AtlasTexture. Each frame needs to be separate image."

+1 vote

I think that the best place would be on the GitHub on the issues page (remember to post as [SUGGESTION] or something like that since the main purpose of the page is for issues.

GitHub: https://github.com/godotengine/godot

by (521 points)
0 votes

i got it working with a shader :)
Animates an atlas in a cycle offset by frame so each instance is not, necessarily, in sync. Can select priority paint to let godot tilemap editor pick a random tile animation for you.

shader_type canvas_item;

uniform sampler2D frames: hint_albedo;
uniform float count;
uniform float duration;
uniform float width;

void fragment() {
    float frame = floor(mod(TIME, count * duration) / duration);
    float offset = floor(UV.x / width);
    COLOR = texture(frames, UV + vec2((mod(offset + frame, count) - offset) * width, 0));
by (1,879 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 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.