SweepSingleByChannel not working

Code below is executed every tick:

	FHitResult HitOut;
	FVector StartLocation;
	StartLocation = GetOwner()->GetActorLocation();
	DrawDebugPoint(GetWorld(), StartLocation, 400, FColor(100, 100, 100));
	FVector EndLocation;
	EndLocation = GetOwner()->GetActorLocation();

	FCollisionShape CollisionShape = FCollisionShape::MakeSphere(400);
	FCollisionQueryParams Params;
	Params.AddIgnoredActor(GetOwner());

	bool WheelSweep = GetWorld()->SweepSingleByChannel(HitOut, StartLocation, EndLocation, FQuat(0, 0, 0, 0), ECC_Vehicle, CollisionShape, Params);
	if (WheelSweep == true)
	{
		UE_LOG(LogTemp, Warning, TEXT("Hit"));
	}
	else
	{
		UE_LOG(LogTemp, Error, TEXT("No hit"));
		
	}

DebugPoint is showing good position.
This code is inside of component.
Its owner is an Actor.

Please help me if you can

StartLocation and EndLocation is the same. I assume this is not what you wanted? If so, you need to provide more information, specifically: what do you expect to happen and what is happening instead?

Im just testing if it works rn. I expect it to give me “Hit” massage in UE_LOG. Instead it always gives me “No hit”.

Okay, why do you expect the trace to succeed? What object is the trace supposed to hit?

It is supposed to hit the ground.

What’s the ground’s collision response to ECC_Vehicle? Does it block or ignore it? Wouldn’t it make more sense to trace against ECC_WorldStatic or ECC_WorldDynamic? Is there a reason you do a sphere trace instead of a line trace?

There is also still the issue that the start location is the same as the end location. You don’t move the sphere. You should move the collision shape when sweeping.

I use it to detect the ground for wheels physics. I changed EndLocation to:
GetOwner()->GetActorLocation() + FVector(0, 0, -100)
, and it kinda works, but when my vehicle is in the air it detects landscape every second tick. When it gets to the ground it starts working normally and detects it every tick. What is going on?