Ways to make a performance effective fire hose?

What am I doing?

What I’m doing is trying to create a fire hose tool
What is the issue?

I’m wishing to know the optimal ways to create this tool which would just extinguish Fire objects
What have I tried?

I’ve looked at examples, and what I could find is that its done through a missile system where it fires blocks from the tool and finds if it touches a fire part and then decreases the heat and size until its gone.

Visual side:

Rather than actually spraying parts or something, I’d advise having a beam and particles that display water being emitted from the end of the hose.

Functional side:

I’d heavily advise you look into using raycasts for this situation. Have the fire part at the end look something like this:

This will serve as a hitbox. And then from your “hose end,” release a raycast, similar to the particle path. So if the end of your hose water is here:

Then cast a ray that will reach from the beginning part to the end part. Once this is done, you can then use things like FindPartOnRay or your own calculations to see if the hose water is hitting the fire part, which you would then extinguish.

Note: Be smart with the number of times you are creating these rays over a short period of time, a simple wait(X) will do in the ray creation function, and then play with the X variable to optimize as much as you want.

10 Likes

Thank you for this detailed explanation

1 Like

Hi! It’s been a while but I’ve been looking through the Dev Forum and this is something I need to fix too. What if the end could be anywhere along the particle line? How could that be done with the ray?