Hotting up! Sofia Vergara covers up in just a bedsheet as she films racy scene with co-star Karl Urban for new movie Bent in Italy

She plays the role of a ruthless agent in upcoming thriller Bent.

But Sofia Vergara appeared to show more of a vulnerable side as she was seen filming for the new movie in Italy.

The brunette beauty, 44, was spotted with just a bedsheet wrapped around her as she shot a racy scene with co-star Karl Urban on a balcony.

Scroll down for video 

Hotting up: Sofia Vergara was spotted with just a bedsheet wrapped around her as she shot a scene with co-star Karl Urban for her new movie Bent

Hotting up: Sofia Vergara was spotted with just a bedsheet wrapped around her as she shot a scene with co-star Karl Urban for her new movie Bent

Showing off a hint of side boob, the Modern Family actress still managed to look glamorous despite being in a state of undress.

Wearing her lengthy locks down over her shoulders, she accentuated her glowing complexion with a dash of blusher, before adding lashings of mascara.

Sofia, who later slipped on a white robe in between shots, appeared to be in high spirits, beaming as she looked out over the balcony. 

Racy: Showing off a hint of side boob, the 44-year-old looked glamorous while on set 

Racy: Showing off a hint of side boob, the 44-year-old looked glamorous while on set 

Beauty: Wearing her lengthy locks down over her shoulders, she accentuated her glowing complexion with a dash of blusher, before adding lashings of mascara 

Beauty: Wearing her lengthy locks down over her shoulders, she accentuated her glowing complexion with a dash of blusher, before adding lashings of mascara 

Her co-star Karl meanwhile put his hunky physique on show, wearing just a pair of white boxers to film the scene.

The Colombian-born actress later shared a glamorous snap from the film set on Instagram, which she captioned 'Last night shooting in Rome' followed by a number of sad faces. 

Bent tells the story of shamed detective Danny Gallagher, played by Karl, who plans to seek revenge after he was framed for killing his partner. 

Sofia takes on the role of government agent Rebecca in the film, which also stars Andy Garcia. 

Beaming: Sofia, who later slipped on a white robe, appeared to be in high spirits

Beaming: Sofia, who later slipped on a white robe, appeared to be in high spirits

Lights, camera, action: The Colombian-born actress looked very much in her element on set 

Lights, camera, action: The Colombian-born actress looked very much in her element on set 

When Rome: Sofia later posted a glamorous Instagram snap, saying that it was her last night filming in the Italian capital

When Rome: Sofia later posted a glamorous Instagram snap, saying that it was her last night filming in the Italian capital

The star shared a sexy snap of her on set on Instagram earlier in the week, which showed her carrying a gun.

She appears to be making the most of her time in Italy, also posting pictures of her sampling the country's famous wine and cuisine with her 12.1m followers. 

Sofia's husband Joe Manganiello has not joined her in Italy for the shoot and is busy promoting his latest film Smurfs The Lost Village.

Earlier this week, the actress was branded 'classless' by her former fiancé Nick Loeb in an explosive letter, which revealed the 'screaming fights' the couple endured throughout their tempestuous relationship.

She has been been locked in a legal battle with her businessman ex - who she split from in May 2014 - attempting to have him officially blocked from taking control of her frozen embryos. 

Dangerous woman: The leading lady shared a photo of her holding a gun on set on Tuesday

Dangerous woman: The leading lady shared a photo of her holding a gun on set on Tuesday

Trying out the cuisine: She posed with pizzas in another Instagram picture as she continued to make the most of her time in the country's capital

Trying out the cuisine: She posed with pizzas in another Instagram picture as she continued to make the most of her time in the country's capital

Loved up: Sofia's husband Joe Manganiello has not yet joined her in Italy for the shoot and is busy promoting his latest film Smurfs The Lost Village 

Loved up: Sofia's husband Joe Manganiello has not yet joined her in Italy for the shoot and is busy promoting his latest film Smurfs The Lost Village 

The comments below have not been moderated.

The views expressed in the contents above are those of our users and do not necessarily reflect the views of MailOnline.

We are no longer accepting comments on this article.