Dane DeHaan has revealed that he made no attempt to become friends with Robert Pattinson before they started filming Life.

The Amazing Spider-Man actor stars alongside the Twilight heartthrob in Anton Corbijn's drama, focusing on the friendship between Life photographer Dennis Stock (Pattinson) and Hollywood icon James Dean (De Haan).

"It's an interesting relationship that they have. They do become close in the film, and they do become friends, but they're not friends from the start," he said.

"So what we did is we didn't try to make any sort of friendship beforehand. We got there and that's when our friendship started. So as it was happening on screen, it was also happening in real life."

The 28-year-old said they bonded on set, adding: " He's a really nice guy. He's totally chill and he's fun to hang out with, and he's fun to be on set with. We had a great time."

Sir Ben Kingsley and Joel Edgerton also star in Life, which wrapped shooting on April 1.

"We just finished a week and a half ago," Dane said.

Life, which is now in post-production, is expected to be released later this year.