WavySprite is an asset that will add a sine wave movements to your images. Here's an introduction video:
- Creates shader-based sine wave animation with controllable frequency, amplitude and speed.
- Allows you to select from horizontal or vertical waves and set which side or the mesh to keep unmoving.
- You can set level of detail for the mesh and control how many triangles are drawn.
- Has unlit and diffuse shader that supports lighting.
- Supports sprite sorting.
How to use
To start using WavySprite click GameObject > 2D Object > WavySprite in Unity's main menu. Or do the same by right-clicking the Hierarchy panel. This will add a new WavySprite object at the center if your current scene view.
Tint, Sorting layer and Order in layer fields work in the same way as they do for sprites, respectively allowing you to tint the image, assign a sorting layer and change the rendering order within a layer.
Lit checkbox will allow you to switch to Diffuse shader which reacts to light sources.
Divisions X and Y will allow you to set the level of detail for a mesh, generated by the asset. After changing it, you will see triangle count increase or decrease on top of WavySprite inspector to show how many triangles are used in the mesh.
Wave direction allows you to choose from vertical and horisontal sine waves. Keep in mind that rotating the sprite will not rotate the wave direction - the shader doesn't support this right now.
Static side allows you to choose which side of the object to keep unmoving.
Wave frequency, force and speed will change the properties of the sine waves generated by the shader.