What is ETraceTypeQuery

Does anyone know what the ETraceTypeQuery is? Its a type that is passed into functions such as GetHitResultAtScreenPosition and GetHitResultUnderCursorByChannel, but I’m not sure what it is.
I’m using the previously mentioned functions to make a character look at the mouse in a top-down shooter. The problem is when the mouse moves over an obstacle it interferes with the direction the character faces. I was hoping the ETraceTypeQuery could solve this issue, just not sure how to use it.

Here is the code that I have:

void ALaserTagPlayerController::RotateToMouseCursor() 
	FHitResult Hit;
	//The two lines below have the same effect
	//GetHitResultUnderCursorByChannel(TraceTypeQuery1, false, Hit);
	GetHitResultAtScreenPosition(Cast<ULocalPlayer>(Player)->ViewportClient->GetMousePosition(), TraceTypeQuery1, true, Hit);
	const FVector PlayerPos = GetWorld()->GetFirstPlayerController()->GetCharacter()->GetActorLocation();
	FRotator PlayerRot = FRotationMatrix::MakeFromX(Hit.Location - PlayerPos).Rotator();
	PlayerRot.Pitch = 0.0f;


Hello, in the 4.22.1 version, you can view the source code of the


function. In the first line,

ECollisionChannel CollisionChannel =

This function converts the enumeration value. To the corresponding


, for example ETraceTypeQuery I use the second TraceTypeQuery2, then the corresponding ECollisionChannel is


, which is the second one.