One of my favorite features upcoming on #FirefighterTycoonFN is the fire trucks's water hose! 馃毧 (This feature is still not finalized) Read more about the mechanics we used to create it 猬囷笍 (And follow @CannonStudiosFN to get notified when the map is released!)

Mar 3, 2025 路 9:50 PM UTC

2
4
21
0
The hose works by generating a new projectile every some time, and simulating the projectile trajectory while checking for a collision. The projectile is checked for collision by making a line trace each time fraction, between the projectile's last position and current.
Here is how it looks behind the scene, using debug draw to visualize the raycasts!
1
1
0
The line trace / raycast is made using the control rig sphere cast, and when detecting a hit the system uses a grid map to search for the fire object at that location. the projectile's trajectory is calculated using the basic kinematic equation.
3