Shapes Traces (Why do we use them?)

Hello! I’m new to AI programming and was doing some research on single and multi-line traces, and shape traces. My question has to do with their specific use. What are they good at? Also, under what circumstances would you use one particular type of shape trace over another (Box vs. Sphere vs. Capsule)? If anybody could help educate me, I would appreciate your help!

I cannot give you a complete answer but this is how I use the different traces:

Line Trace: To detect if there is a Line of Sight between two points. Most of the time I use it on hit scan weapons like snipers. Another use would be to find where the nearest obstacle/object is…

Box Trace: To detect in some object/obstacle is within a certain area. I use it to check an make sure where Ican spawn pickups. I do a box trace with size equal to the dimensions of the pickup mesh. If it has no hit anything, that means there is enough space for spawning the pickup. Otherwise it means something else is in that area

Other shape traces: Just like above, you pick the shape that fits your purpose:

This should shed some light on the topic:
https://docs.unrealengine.com/latest/INT/Gameplay/HowTo/UseRaycasts/Blueprints/index.html#shapetraces

Okay that helps a little bit, but then when would a sphere or a capsule come in handy? I read that article already, and it wasn’t too particular about what the shapes are actually good for other than checking a volume of space. What I’m really interested to know is why would you use a sphere over a box? Why would you use a capsule? What is cool about this? I know there is something, I just don’t know what it is. Is there any particular reason you would want a rounded volume trace over a boxy angular one?

The best way to see their difference is to enable ‘debug draw’ while doing the trace. That way you could see how they are traced and what volume they cover. :slight_smile:

Okay, thanks for your help!