Download

RayTrace Cone

Hello!

We need a RayTrace Cone Shape for blueprints desperately.

This has been requested a few times but unfortunately PhysX doesn’t have any kind of Cone Shape from what I understand. Epic would have to modify PhysX to support this, which would make updating the engine to newer versions of PhysX more difficult. Not impossible though!

so, as i understand, you want a trace for objects in a shape of a cone, i’ve done it before but i didn’t use a trace because i was need it for one frame check and i already had array of actors.

so idea is a trace from point A to point B to check is object C is collide with a cone shape as i show at part 1 of the pic.
for this purpose you can use Box Trace, same rules, from A to B for object C - part 2 of the pic, but with additional filter of a angle a which is a angle between center of the trace and the object hit result as i show at part 2b of the pic.
The 1a pic is more a demonstration of the concept of angle a.
trace.png
I cannot prove the concept right now and sorry for poor english and my paint skillz, but i hope it help.
p.s. to calculate the angle i used the law of cosine.

I’m glad to hear that it isn’t impossible to implement and i’d love to see it in a future release, because it is very useful however it is annoying that a ConeTrace cannot just have a taper applied to it.

i actually described a way to make it via blueprints ^^
so if you really need that, you can spend a hour and make a function for it.

I’d love to see it. I’m actually curious on how your implementing it and i suspect its a bunch of separate raycasts?

thats how you do that.

Thank you! This just helped me finally fix things at 3am.