How do I give a beam a bigger hitbox?

I’m trying to make an ability that goes though your opponent and creates a beam behind them, and the beam does damage. I tried ray cast hit player but it felt absurdly hard to hit someone if they were moving. So I’m trying to make the hit box bigger without the player needing to see them while being able to hit multiple players.

If a player moving causes the Raycast to not consistently hit you could incorporate the projectile speed and target velocity

Event Player.CurrentVictim + Up + Distance Between(Event Player,
		Event Player.CurrentVictim) / Event Player.ProjectileSpeed * Velocity Of(Event Player.CurrentVictim)

Where
Event Player.CurrentVicitm replaces your target player
and
Event Player.ProjectileSpeed replaces your well… projectile speed.

Pill-casting however isn’t really possible and the best alternative would be to use multiple Ray Cast with an offset to represent each of the corners.


But considering you also need to be able to hit multiple players you might also want to try Players In View Angle with a very small angle size.
Wouldn’t require LOS and catches all players in one action that meet the criteria.

Would however become problematic if you were to have a delay between the input and actual check as it only works with the players current camera position, ie it would require a dummy placeholder for that delay in between.

Attempting this with ray cast could become quite quirky as it requires LOS and would need to be recast for every player hit just with previous players hit removed from the new ray cast.

You can also use math to solve that, like I did here:

The important part is in the condition of the if-statement. It calculates the distance between the targets position and the closest position on the beams center-ray.