Why is FCollisionQueryParms instantiated before function call?

Please, am i missing something? Why do we define/instantiate FCollisionObjectQueryParms IN the function call and the FCollisionQueryParams above the function call?
IS there a reason or you could define both before making the call?

No real reason. Though I suspect having the non-Object query params being in the function call would look … not great.

In fact the ObjectQueryParams constructor is non-explicit and there’s no ambiguity in the overload set of LineTraceSingleByObjectType (i.e. that argument is definitely for a FCollisionObjectQueryParams) so you can actually just use ECollisionChannel::ECC_PhysicsBody directly and it’ll create the FCollisionObjectQueryParams implicitly in the call.

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.

Privacy & Terms