Turrets, horses and other mounts
A mount is an actor with a mountable component and at least one seat. There is no vehicle base class involved, no physics requirement, and nothing to opt out of.
A turret
One seat, no wheels. The interesting part is where the seat is parented:
AMyTurret::AMyTurret()
{
Base = CreateDefaultSubobject<UStaticMeshComponent>(TEXT("Base"));
RootComponent = Base;
Head = CreateDefaultSubobject<UStaticMeshComponent>(TEXT("Head"));
Head->SetupAttachment(Base);
Mountable = CreateDefaultSubobject<UEDMountableComponent>(TEXT("Mountable"));
GunnerSeat = CreateDefaultSubobject<UEDMountPointComponent>(TEXT("GunnerSeat"));
GunnerSeat->SetupAttachment(Head); // the whole trick
GunnerSeat->RoleTag = EDMountingTags::Mount_Role_Driver;
}
Parenting the seat to the rotating head means the gunner turns with the gun. No tick, no code, no per-frame transform update — the seat is a scene component, so the attachment does it.
Aiming reuses the same hook a car uses for its wheels:
void AMyTurret::ApplyDriverInput_Implementation(APawn*, const FVector2D& MoveInput, float, float, bool)
{
const float Delta = GetWorld()->GetDeltaSeconds();
FRotator Rotation = Head->GetRelativeRotation();
Rotation.Yaw += MoveInput.X * TurnRate * Delta;
Rotation.Pitch = FMath::Clamp(Rotation.Pitch + MoveInput.Y * TurnRate * Delta, -PitchLimit, PitchLimit);
Head->SetRelativeRotation(Rotation);
}
Mount.Role.Driver means "the seat that steers this mount". A turret's only seat is a driver's seat.
Leave the seat's Possession Policy at Keep Possessing the Rider, the default: a gunner should keep their own pawn, camera and abilities while manning a gun.
A horse
A pawn with a movement component, a mountable component, and a seat parented to the saddle bone:
SaddleSeat->SetupAttachment(GetMesh(), TEXT("saddle_socket"));
The seat follows the bone, so the rider moves with the animation — including the vertical bob of a gallop — with nothing driving it.
Put the mounting animations on the horse rather than on the rider, through the mountable's own
Mount Animation Set: climbing onto a horse is not climbing into a car, and that difference belongs to
the horse. Key the entries on Mount.Entry.Left and .Right so mounting from either side works.
If you want a rider who can be knocked off, turn off Disable Movement Component in that seat's rider policy — the rider keeps simulating, and your game decides when they come loose.
A ski lift, a lift, a moving platform
A seat parented to the moving component. That is the whole implementation.
To stop people boarding while it is moving, SetMountable(false). To stop them leaving, set the
seat's entry points to bAllowExit = false for the duration and turn off Allow Unsafe Exit
Fallback: RequestDismount then fails with NoExitPoint, which your UI can turn into "not while it
is moving".
A rock
Genuinely. A static mesh actor with a mountable component and a seat is a thing a character can sit on. That is the level of ceremony involved.