top of page
Search
  • Writer's picturetoofan tahmouresi

Rain System Integration

After creating my rain particle I needed to integrate it into the game mechanic and defined some parameters to control the rain mechanic.


For this matter, I created a different Bluprint called WeatherController. In this blueprint, I defined some variables RainLevel and ChangeRate, and also creating a material parameter for the global aspect of the game.

in the material parameter, we add some scalar parameters such as RainLevel and also the Gloom which will be explained in the next blog. after integrating the Mp_global parameters. in the weather control blueprint I added the new method to calculate the rain level and change rate of the rain system.




and after these integrations, I created a new variable called sky and as object type, we select Bp sky sphere. and with reference to the sky, we add the update sky nod and connect the rain level method to this node.




right after that in the event graph tab, I created a custom method called toggle rain so according to that I could play the rain particle or stop in according to our need and set the rain level variable.




for calling this custom method on the Event Begin Play we call our toggle rain method and also attach it to the player component and set it off at our desired time.



after these integrations, I added the weather controller blueprints into the scene and define the sky Bp in the default section.


and the result is:






18 views0 comments

Commentaires


bottom of page