How do I make a surface walkable?

If you look at the UCharacterMovementComponent class, you’ll see it assumes that in order to find the “floor” it can trace in the direction of the negative Z axis.

For example, CharacterMovementComponent.cpp line 3518:


bBlockingHit = GetWorld()->SweepSingle(Hit, CapsuleLocation, CapsuleLocation + **FVector(0.f,0.f,-TraceDist)**, FQuat::Identity, CollisionChannel, CapsuleShape, QueryParams, ResponseParam);

Similar assumptions are made on line 3531, line 3566, and possibly elsewhere.