How could I set collision shape to be a capsule with a certain height and radius?

For the sweep single function, what would you normally enter in the parameters FCollisionObjectQueryParams and FCollisionShape part. For example how do I set the collision shape to be capsule with certain amount of height and radius? Here is all I have so far

GetWorld()->SweepSingle(OutHit, StartLoc, EndLoc, Rot, stuck with the collision shape, CollisionQueryParams, and stuck with objectqueryparams);

Don’t have source access here at the moment, but I’m using the following code to check collision using a capsule and the OverlapTest() function:

        // Collision params
	FCollisionQueryParams colQueryParams(NAME_None, false, this);	
	FCollisionObjectQueryParams colObjQueryParams;	
	
	// Capsule extent
	FVector extent;
	extent.X = newWidth * 0.5f;
	extent.Y = extent.X;
	extent.Z = newHeight * 0.5f;	

	return !(GetWorld()->OverlapTest(newLoc, FQuat::Identity, FCollisionShape::MakeCapsule(extent), colQueryParams, colObjQueryParams));

You should be able to adjust this to suit your needs.