how to make a spray?

how to make a spray? I want to continuously create a spray cloud by holding down the left mouse button. and when a player entered this cloud, he took damage. how to do it?

I cant tell you exactly, but i can get you started. There are two parts, the visual effects and the collision mechanics (are you in the spray)

Visual effects can probably be handled by Niagara

Creating Visual Effects in Niagara for Unreal Engine | Unreal Engine 5.6 Documentation | Epic Developer Community

Collision probably handled by normal collision volumes. The hard part is getting the collision volume to correctly match the visuals. Niagara might have some way to help with collision mechanics but i imagine it could be very computationally expensive.

This is just an idea, there may be better methods for this, but it can start you off