Wilson, 38, dropped out of the Ben Stiller-directed movie after he was hospitalized for what police called a suicide attempt last month.

The role being taken by McConaughey, 37, is essentially a cameo in an ensemble cast that includes Stiller, Jack Black, Robert Downey Jr. and Nick Nolte. The movie is a comedy about a group of actors shooting a war movie on a deserted island that comes under real attack.

Wilson has returned home from the hospital. He canceled appearances at the Venice Film Festival earlier this month but is "doing well" and "making us laugh a lot," says his longtime friend, director Wes Anderson.