"Allegiant" New York Premiere - Inside Arrivals
Credit: Michael Stewart/Getty Images

Dylan McDermott is taking a flight into comedy.

The Practice alum has signed on to the Fox comedy pilot LA > Vegas. The project, which is executive produced by Will Ferrell and Adam McKay, follows a flight crew on their Friday night trip into Sin City and on their Sunday return flight to Los Angeles.

McDermott will star as Captain Dave, a cocky and narcissistic pilot, who spends as much time hanging out with his passengers as he does flying the plane.

The pilot episode will be directed by Modern Family creator Steve Levitan and written by Happy Endings producer Lon Zimmet.

LA > Vegas serves as a rare foray into comedy for McDermott, a Golden Globe winner for his time on The Practice. In recent years, he has been a series regular on the first season of American Horror Story and on one-season CBS dramas Hostages and Stalker.