SUMMER TIME
Intro
As everyone knows, we are in summer!
Regarding Everhood, the development will maintain the same rhythm as before.
Working on Everhood is rewarding! So why take some vacation!?
We are currently finishing the last big parts of the game, we will soon enter the polishment phase. Sadly this is all I can say, who wants a spoiler, right?
So to compensate that here is a mini-tutorial on how to make 2d water mask effect.
2D Water mask effect mini tutorial (unity)
For this mini-tutorial, I’m going to break it in 2 parts, how do this effect work and the implementation.
How?
As his name says, the water mask effect uses a SpriteMask that gets activated when the player enters the water and deactivated when the player exit the water.
As you can see, the gif entirely describes how does the effect work.
The implementation
Water mask setup
First of all, create an empty gameobject named “Player” with a BoxCollider2D component, then add a child named “Visuals” and a SpriteRenderer component to it with a sprite of your character assigned.
After that, let's add another child named “Water Mask”:
and a SpriteMask component to it :
Now the water mask need to affect player spriteRenderer, so let’s click the child “Visuals” to access our spriteRenderer component and set Mask Interaction to Visible outside Mask:
And to finish the water mask setup, adjust the child mask size:
Trigger water mask setup
Now we need to trigger the water mask, for that, create a gameobject “Water” add a spriteRenderer component to it, assign a square sprite and adjust color and size to make it look like water.
Then, let’s add a box collider 2D to it with IsTrigger set to true and a script that executes a UnityEvent on OnTriggerEnter2D and OnTriggerExit2D, finally, hook up waterMask.setActive(true) to OnTriggerEnter2D and waterMask.setActive(false) for OnTriggerExit2D:
Profit
Now that you have the basics on how to create a water mask, you can improve it by adjusting the trigger zone, adding particle fx, modifying player movement speed and much more!
//Jordi
Wishlist us here so you don't miss any news:
Get Everhood
Everhood
Status | Prototype |
Author | EverhoodDev |
Genre | Adventure, Rhythm, Role Playing |
Tags | 2D, Experimental, Music, Mystery, Pixel Art, Top Down Adventure, Undertale |
Languages | English |
More posts
- Everhood is OutMar 07, 2021
- EVERHOOD RELEASE DATE ANNOUCEMENTFeb 01, 2021
- The divine moments of creativityJan 27, 2021
- A look back into the dark timesJan 20, 2021
- Testing, fixing, testing and testingDec 30, 2020
- Hectic weeks and some thoughts!Dec 09, 2020
- Time to start wrapping up the game again!Nov 18, 2020
- Game engine version change and just polish, polish, polishOct 30, 2020
- Lot of work right now!Oct 09, 2020
- Yet another postSep 25, 2020
Leave a comment
Log in with itch.io to leave a comment.