I’ve been thinking (and looking trough code), for something that would allow me to create radial trace.
Simply speaking radial trace would search in set radius from point of origin (that could specified by user, or attained from example line trace hit info) for actors on specific collision channels.
The closest thing that come to this is probably UGameplayStatics::ApplyRadialDamage. But problem is, that this function have very specific use, and more over it calls AActor::TakeDamage (as far I can tell).
I don’t need to deal damage. What I need is to get array of actors (HitResult) in radius from trace origin.
I’ve been trying to think about solution on my own, but to be perfectly honest it bit beyond my expertise to think about something efficient right now, as my line o thinking basically revolves about brute force line tracing in radius from origin point. And I don’t really think that is efficient solution to the problem.
Why do I need radial trace ? Two use cases for right now:
- Hit actor with line trace. Now on actor hit execute radial trace, and jump to another actor (firs hit), make another radial trace, jump to first found actor, etc. X amount of times.
- I have more or less custom damage system right now. TakeDamage from AActor is to limiting, or would become far to complex if I would try to push all possible damage trough it. As right now damage can be dealt to all attributes of character (and each attribute can take damage bit differently). There is of course build in system for radial damage. But since I can’t really use it I need to build my own and build in radial trace would probably solve the hardest part.