+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?

asked Jan 28, 2019 in Engine by Forward (36 points)

3 Answers

+5 votes
Best answer

Godot 3.1 includes AnimatedTexture for just such purposes.

answered Jan 28, 2019 by kidscancode (17,871 points)
selected Jan 31, 2019 by Forward

"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

answered Jan 28, 2019 by fpicoral (504 points)
0 votes

i got it working with a shader :)
https://github.com/rakkarage/PixelLevel
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));
}
answered Jun 5 by rakkarage (1,336 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.