Download

Windzone

Hello. I’m working on a mmofps and I want to know if is there a way to create a zone where would be wind, from different direction based on a time stamp+randomization of it. Also, I would like it to apply a “power” to the direction of bullets but also on environment, while it would apply a different power for each element.
It’s pretty strange, but I have no ideea how to do it.

Up, Still have no ideea how to do it.
A good example is a sandstorm. For example, in my FPS game, whenever you try to shot in a sandstorm, your bullet won’t go straight, but will go to left/right, depending on the wind direction. Now, I don’t want the bullets and grass to move the same way, so I need somehow to modify the power wind will execute on every part, including trees, grass, bullets or even players.

I suggest you have a look into the BP and material of this free asset: https://www.youtube.com/watch?v=FaCQWUL0Htw

Of course it’s possible.
What I would do is use a combination of Trigger Volumes and Blueprint Interfaces.
A trigger volume is a 3D region that triggers when an actor enters and leaves it. So you could have a trigger volume with two variables, Wind Strength and Wind Direction.
A blueprint interface is a way to “broadcast” an event without worrying about the details. For example, let’s say your interface has two functions: Entered Windzone (with strength and direction inputs) and Left Windzone. Then you can have several actors implement that interface, and have the trigger volume call those functions on all actors that enter the volume.
Finally, on every actor that you want to be affected by the wind, you implement that interface and define those functions. For example a bullet may change speed and direction, while a character may do something else.