+2 votes

Hello! I would like to recreate an effect similar to the one in the gif below, can someone point me to the right direction?

this

in Engine by (62 points)

Did you find a solution? I have done something similar to this in the past in Gamemaker. I am going to try and convert it into Godot. Here's the tutorial reference:

https://zackbellgames.com/2014/11/11/sprite-skewing-for-procedural-animation/

I decided to go into more of the mechanics of my project instead of making it look good first, so I'm yet to try to make this.

I'm doing the same. If I figure out a solution I'll share it with you.

2 Answers

+2 votes

The swaying effect is often achieved with pixel shaders.

The image you provided also appears to have some particle effects, which are easy to pick out because they are a lighter shade of green.

This is a Unity tutorial explaining the concepts for 3D, which you can translate/simplify to do it in 2D with Godot:
https://www.youtube.com/watch?v=aKzUsxLJ4SU

You may also wish to combine it with this technique to smooth out the 2D motion:
https://www.youtube.com/watch?v=2JbhkZe22bE

by (862 points)
0 votes

Hey,

I found this shader, which works as you want except it doesn't move more when you walk on it...

https://github.com/Maujoe/godot-simple-wind-shader-2d/tree/master/assets/maujoe.simple_wind_shader_2d

You have to play with the shader parameter, then, you'll get something like that :
https://twitter.com/i/status/1341827250082230279

by (30 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.