Cone line trace possible?

Hi,

I’ve made a single line trace to trigger an action when it hits something. This works fine. However, I the line trace should actually be a cone, like a view cone of a person. Then if the object hits the cone lines or is in the cone, it should be triggered. Is this possible to make in blueprint? Or else by C++?

Thanks in advance.

This type of query is not supported by PhysX so it’s not possible in blueprint or C++.
You could try using a combination of shapes like spheres and capsules of different sizes to fake it.

Okay, thanks for the info!

I took an array of sphere traces gradually increasing in size. If one hits, exit out of the loop.

You could use a blueprint with a collision sphere and a projectile movement attached to it, moving at whatever velocity you need. In the tick event, increase the sphere radius in relation to the time delta at a constant rate for a cone shape, or variable/compounding rate if you want an exponential or logarithmic wave shape. You could even have a sin-wave type shape if you wanted by oscillating the size.

Better yet, instead of using the time delta, use the distance away from the origin to set the radius.