Overlapparams or ShapeCasting?

Recently roblox released a new type of raycasting called ShapeCast which includes BlockCast and SphereCast

Now here’s a question:
If I were to create a projectile hitbox, which one should I use? Raycasting doesn’t seem good for larger projectiles. Overlapparams and ShapeCasting seems nice, but which one’s better

I’m primarily looking for better performance and less lag

1 Like

You should use ShapeCasting on your case since it’s more effective and easy to work, which causes less issues.

iirc, isn’t OverlapParams just a type of filter? It isn’t a raycasting method.

If you mean :GetPartBoundsInBox() and :GetPartBoundsInRadius():

:BlockCast and :SphereCast returns something similar to what you get form using workspace:Raycast()
:GetPartBoundsInBox() and :GetPartBoundsInRadius() returns a table of parts.

Both methods accept OverlapParams to exclude/include descendant instances.

In a nutshell, ShapeCasting gives you more information, but only for one part.
Spatial queeries such as GetPartBoundsInBox does what the method says, returns a table of parts, but nothing else.