I just to ask something,
You said in your lecture that we need to add collision parameters and add GetOwner() so that the first collision to ourselves is not recorded, however, if we just ignore adding collision parameters even than we don’t get a hit to ourselves.
i.e. GetWorld()->LineTraceSingleByObjectType(FirstHit, PlayerLocation, LineTraceEnd, ECC_PhysicsBody)
Moreover, we can directly write ECC_PhysicsBody in ObjectQueryParameters.
My question is that if we leave collision parameters will it effect in longer run or it doesn’t matter ?

1 Like

Not providing that argument means it will use FCollisionQueryParams::DefaultQueryParam which doesn’t ignore the owner, so you have the possibility of hitting yourself in the trace.

1 Like

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

Privacy & Terms