Incorrect Player Starts Chosen with Chaos Physics Vehicles

I’m seeing some behavior which looks incorrect regarding how the engine chooses Player Start locations for actors that are based off the ‘AWheeledVehiclePawn’ class.

In AGameModeBase::ChoosePlayerStart_Implementation, PlayerStart locations are filtered out, then one is chosen at random. One of the ways those PlayerStarts are filtered out are if anything is blocking the spawn, via ComponentEncroachesBlockingGeometry.

At this stage, the actor has not been spanwed and, the PrimComponent (which should be the Mesh, see AWheeledVehiclePawn::AWheeledVehiclePawn) has not been registered, and because the PrimComponent is a mesh and not a UBoxComponent, UE throws the following error:

			UE_LOG(LogPhysics, Log, TEXT("Components must be registered in order to be used in a ComponentOverlapMulti call. PriComp: %s TestActor: %s"), *PrimComp->GetName(), *TestActor->GetName());

Obviously you can force the actor to spawn anyways via flags on the asset, but that will run into other issues where trying to teleport the newly spawned vehicle will once again run into issues in this ComponentEncroachesBlockingGeometry function, where it won’t attempt to modify the position because it’s not using a UBoxComponent.

To repro:

  • Create a blueprint based on WheeledVehiclePawn
  • In the pawn, set the skeletal mesh to your car
  • In the car physics asset, auto generate all bodies (I used spheres for the wheels, single convex hull for the chasis)
  • Place 2 player starts on the level, join with 2 clients.

The result is that (randomly), the server will choose to spawn both cars on the same PlayerStart without considering that one is blocking spawning the other.