The character doesn't have to be exactly like them, but as an author you have to give something to the reader that shows the vulnerability and where the character's coming from...You can have characters do awful things, but you make them relatable or have some kind of backstory that makes their actions, even if it's not excusable, understandable...