Returns whether a unit is in a vehicle. A unit can be riding in a vehicle without controlling it: to test whether a unit is controlling a vehicle, use UnitControllingVehicle or UnitHasVehicleUI.

Note: multi-passenger mounts appear as vehicles for passengers but not for the owner.

See also Vehicle functions.


inVehicle = UnitInVehicle("unit") or UnitInVehicle("name")


  • unit - A unit to query (string, unitID)
  • name - The name of a unit to query; only valid for player, pet, and party/raid members (string)


  • inVehicle - 1 if the unit is in a vehicle; otherwise nil (1nil)