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?
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?