I’ve been using a lot of line traces in my code, using a UWorld object and functions such as LineTraceSingleByChannel.
However, for one instance I really need to use a capsule trace, but intellisense can’t find any function equivalent to this for capsule objects. I know it exists in Blueprint, but I have to use this in C++ because of how the code is structured. Where is this function located if not in the same place as the line traces, and why is it not in the same place?
For my current purposes this may work, but it isn’t quite the same thing as a trace.
Having said that, OverlapSingle appears to just be throwing compile errors at me, telling me the arguments are incorrect, though I can’t see what I’m doing wrong:
if (GetWorld()->OverlapSingle(result, GetActorLocation(), GetActorRotation(), ECollisionChannel::ECC_WorldStatic,GetCapsuleComponent()->GetCollisionShape(),FCollisionQueryParams::DefaultQueryParam))
EDIT: Managed to get the collision test working using OverlapBlockingTestByChannel, but that doesn’t return any hit information, which I need.
Sorry, yes, that appears to work. Seems odd that it has a different naming convention to the line traces, but at least it exists. It’s doing exactly what I need it to now, thanks!