- Home /
Make smoke fade away when player passes through
Hey everyone, I'm working on a school project, a Zelda like in which I'd like to add a fog effect.
Problem is, we want to play on what can bee seen and what can't, and for this we need to have a halo of "non-fog" around the player. I figured I could make an empty object that would destroy the particles of smoke that enter its collider, but it wouldn't give the impression that the player is despersing it (kinda like when someone smokes and you agitate your hand to clear the air). So I'd like to know if there's a way of making particles fade away with colliders or another way of doing this. Thanks in advance !
P.S: I'm sorry if I'm not super clear, english isn't my native language ^^
Could you post an inspector of the character?
Also it's a 2D game correct?
Answer by myzzie · Mar 08, 2018 at 01:03 PM
Take a look at the trigger module in the particle system. You can define a collider component and either kill the particles or make a callback and make the fade out in script.
You mean this https://docs.microsoft.com/en-us/dotnet/csharp/program$$anonymous$$g-guide/delegates/ ? I never heard of callbacks
Gonna try the first option rn :D
Your answer
Follow this Question
Related Questions
Need a "ghost" script ! 1 Answer
Make enemy appear in front of player and then disappear at random times 2 Answers
The player disappears in the air 1 Answer
Smoke Follow Player 1 Answer
Player suddenly disappears! 4 Answers