Has anyone done a 2D Reflection in Cocos Creator before?
Could you give me some tips or ideas on where to start?
Could you be more precise? What you are trying to reflect? Is it a 2d game? Is it a 3d?
If it is a 2d game and you just need reflect a node on axis Y or axisZ, simply scale by -1 for that axis. It could be a solution.
Without more info it is complicated to answer your question.
Hi, Thanks @edwardb for your reply!
Reflecting a static object would be easily done with just a scale Y -1 and maybe some opacity, but I’m looking for a real time reflection on a shiny floor.
It’s a 2D game basically something like this, but it doesn’t even need to have the swaying of the water, of course a proper water reflection could be cool to have as well for the future ![]()
@Ronsku This can be done with shaders.
You can refer to this.
But this is done for static bg, so you can modify this by Camera + RenderTexture + this-effect
I used an additional camera together with a RT. It works perfectly, but causes double drawcalls if I want to reflect everything which of course isn’t optimal.