Download

Cone Shaped Trace?

Is it possible to make a cone shaped trace? I’m using 4.5

Hello,
I found only this answerhub thread with a way to do it : Cone Check/Cone Trace - UE4 AnswerHub

I can’t get a trace to rotate with the object its coming from. How can I set the rotation direction of the trace.

I came up with something that works for a cone trace option if anybody its lookin for a solution. I used a cone brush, shaped it, and then made it a static mesh. Then added the mesh to my actor BP, placed it, attached it to actor mesh, and set the material of the cone to something invisible. You set collision to overlap everything for the cone, and you can get a overlap node for the cone in the graph. You can’t get hit results, but its similar to a trace, and it will find anything it overlaps. Its working my situation and may work for yours. Cheers! !

Vector math, you need it to develop games.

it is just some vector math that you even do not need to program.
get some blueprint component that has same forward vector as your general direction tracing vector.
make vector that points N*15deg to the right
rotate this vector 30 deg around looking or general direction vector
you have start and end location for trace
do full circle

repeat above for next value of N

or if cone can be pyramid not really circular cone:
start location is your camera ow whatever you want trace from
then for end location you have 2 loops one iterates rows other columns every 10 or so untis
then either trace in local coordinates to actor.
or get those values, rotate them so they match world rotation, then add world location of begin trace spot.

There is also multiline trace, or sphere trace (just trace along looking vector and increase sphere radius to match size of cone).

@DJ-INSERT, I think you can extend your own idea and procedurally create enough trigger shape to cover the cone shape so you get more precise hit location.(imagine that you are going to put ceramic tiles on a cone shaped base)
You can generate components on the fly and then binds the overlap begin/end events as well.
A cone is not a trivial shape, so most physics engine don’t support cone shaped collision, they make it approximated with pyramid shapes to speed up hit detection.
(imagine that the base as a pie, you slice it, and every piece have it’s own weird shaped pyramid that are all triangle, when you slice enough pieces, you get really good approximation of a cone.)

             I think Nawrot's idea is also worth trying as traces are actually quite cheap.