This site is currently in read-only mode during migration to a new platform.
You cannot post questions, answers or comments, as they would be lost during the migration otherwise.
+1 vote

enter image description here

enter image description here

as the 2 examples above show. I'm looking for some direction for a way to implement/mimic the ripple effect, reflection, and the “the Chowder effect”, or “the Gankutsuou effect” of the water shown in the game pokemon emerald.

my current take is that I would be able to achieve this by just rerendering a copy of the player that is inverted. and have the puddle/water texture be a cutout to a scroller background behind the texture map. not sure if this is the right approach or if there is a better way to go about this is shaders.

note: I'm not looking for this to be done for me but some helpful resource or a nudge in the right direction would be nice.

in Engine by (35 points)

This could be achieved with a shader. How to do that, though, is beyond my skill. The shader would have to reflect the player (or at least the sprite of the player's current state) and then apply some stretching animation. Maybe look on the Godot Shader website for some inspiration?

1 Answer

+1 vote
Best answer

im not a pro in godot :P
but maybe you could create a copy of the player (maybe create a new node) but with 2 animations (maybe animatedsprite child node) : 1 with the normal reflection (ur 2nd image) and 1 with the shadow in the water (the 1st image). you need the frames to be reverted compared to the player
the copy should detect when the player is on a bridge (or anything you want) so the copy would become in shadow animation, and otherwise it should be in reflection animation (as you said the water is a cutout to scroller background, so we won't see the reflection in other places like in the grass) : maybe you can use a signal so when the player is on bridge it sends signal to the copy so the copy turns into shadow animation (the bridge may be area2d node or smth like that idk)
then you can script that copy so it will move exactly like the original player
then you put this copy as a background of the game (like a scrolling background or parallax background idk)

by (71 points)
selected by
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.