Is it possible to do "volumetric" ray casting?

Hello,
In my game, I have ray casting set up using the single channel trace. I’ll be using this for casting actual rays as spells. Since rays obviously have no volume, this is pinpoint accurate for hitting enemies. While this technically works, being pinpoint accurate is not as user friendly as I would like. I’m looking for a way to do the equivalent of ray casting, but as an elongated box to give the player a little more leeway with aiming and hitting enemies (like a really fat ray). If I simply had a box for collision jutting out from the player, that would either block everything it hit (definitely not desirable) or I could overlap, but collision checks wouldn’t go “out” in a direction like a ray cast does and wouldn’t stop when it first hits something. Does anyone know of a way I could go about getting the effect I’m looking for? Thank you.

P.S. I write everything in C++ and I don’t use blueprints.

Yes, this is possible. It is called a Sphere trace. I have never done it in Blueprints myself, but Rama has a very good answer that you can use: How to make a Sphere Trace - C++ - Unreal Engine Forums

Ah, this looks promising. Thank you very much!

You could also do 4 (or any number) of ray casts that are close to each other in parallel. If any one of them hit the target, count it as a hit. In this way, if the target is partially behind something and hence blocked by one ray cast, they can still be hit by the others - you would not get this in a sphere ray cast.

The sphere trace ended up working out really well for me. For this game, I don’t think I’ll need the type of accuracy described in your method, but I’ll keep the idea in mind for future projects. :slight_smile: