"Top Gun: Maverick" star Glen Powell got some interesting advice from co-star Tom Cruise when prepping for his role in the movie.

"Lean into the d-----baggery of it all," Powell claims Cruise told him.

In the movie, Powell plays Lt. Jake "Hangman" Seresin, a cocky pilot being trained by Cruise's character, Capt. Pete "Maverick" Mitchell.

"Sometimes you can fall into the trap of wanting to be liked on camera," Powell explained during a conversation with Kate Hudson for Variety. "And in a movie like this, where you know there’s going to be a lot of eyes on it, you don’t want to be Draco Malfoy," he said, referencing the infamous bad-boy in the "Harry Potter" series.

Glen Powell wearing a white button down and blue/teal blazer poses next to a pointing Tom Cruise in a black suit on the red carpet

Glen Powell, left, and Tom Cruise starred in the wildly successful 2022 film "Top Gun: Maverick." (Han Myung-Gu/Getty Images for Paramount Pictures)

'TOP GUN: MAVERICK' BREAKS MEMORIAL DAY BOX OFFICE RECORDS WITH $151M, LANDS TOM CRUISE BIGGEST MOVIE LAUNCH

"Tom gave me this advice: ‘For the ending to work, you have to completely lean into that. Everybody else in the movie is questioning their own ability,'" Powell said, recalling what Cruise said about Powell’s character.

"You’re the only guy that’s not questioning it. So, if there’s any sort of apology in anything you say, the movie doesn’t work. Lean into the d-----baggery of it all."

Tom Cruise in a black tuxedo smiles alongside co-star Glen Powell in a white tuxedo on the red carpet in Cannes, France

Glen Powell, right, says Tom Cruise told him to "lean into the d-----baggery" of his character in "Top Gun: Maverick." (Marc Piasecki/FilmMagic)

CLICK HERE TO SIGN UP FOR THE ENTERTAINMENT NEWSLETTER

Powell originally auditioned for the role of Lt. Bradley "Rooster" Bradshaw in "Top Gun," which ultimately went to actor Miles Teller

He explained, "I've journaled about all this stuff because it’s hard to describe. I was prepping for that audition for months. I was living on naval bases. Then I didn’t get the role," he said.

Not only did Powell have to come to terms with not getting the role, he says that "then this whole situation where Tom Cruise is pitching me a new role" fell into his lap, which is how he got his name on the credits.

Lea Michele, Glen Powell, and Emma Roberts sit around a table during a "Scream Queens" scene

Glen Powell played frat-star Chad Radwell in the first two seasons of "Scream Queens." (FOX Image Collection)

CLICK HERE TO GET THE FOX NEWS APP

For Powell, 34, this isn't the first unlikeable character he feels he has embodied.

He told Hudson of working with her brother, Oliver Hudson, "I keep getting cast as a d-----bag, even the thing I did with Ollie [Oliver Hudson] in ‘Scream Queens,’ where I’m a super douche."