Octavia Spencer feared she'd be crushed by a car while shooting 'Hidden Figures'.

Octavia Spencer

Octavia Spencer

The 46-year-old actress plays mathematician and computer pioneer Dorothy Vaughan in the upcoming biopic and was very nervous about her first scene, which saw her on the ground fixing a vehicle, because she didn't know what she was doing and she's "claustrophobic".

She admitted: "I was terrified because I'm claustrophobic. I kept thinking it was going to fall on me."

Octavia initially thought the movie was a work of fiction as she had no idea that African American women had been involved in pioneering work for space agency NASA.

She said: "I'd never heard that African American women were involved.

"We knew history was being made when John Glenn completed his first revolution in space. Everybody was happy to cover that, so I understand how history overlooked the women -- they weren't really focusing on the how.

"You used to see white men, in white shirts; and that was it."

The Oscar-winning actress - whose character is a mathematician who supervised the women in the computer pool - hailed the work done by her alter ego and the other women featured in the film, Katherine Johnson (Taraji P. Henson), a numbers genius who helped chart the trajectory of John Glenn's space missions, and aerospace engineer Mary Jackson (Janelle Monae), as "pioneers", particularly because of the background of segregation that they had to work in.

She told the Daily Mail newspaper: "Younger people with little or no comprehension of segregation won't understand why women couldn't use the same bathrooms, or coffee machines as their white counterparts.

"These women were pioneers -- despite what was going on in society. They were barely seen as U.S. citizens.

"In spite of segregation, and misogyny, these women rolled up their sleeves and brought our men to and from space."

In her real life, Octavia admits she is "proficient" in maths and preferred some areas of the subject over others.

She said: "I was proficient. I'm a problem solver, if it's visual. I loved trigonometry. I did not understand geometry. The numbers meant very different things to me."