That's right, there needs to be a threat in order to shoot. I don't think you can even use a gun in a citizen's arrest (unless the perp threatens you with bodily harm), even though I know that the police has looked the other way in some cases.In many, if not most jurisdictions, you can only use lethal force in defense of yourself or another...not in defense of property. The general exception is arson...if someone is about to burn your house down there's often a legal assumption it can injure or kill anyone inside or trying to perform rescue or trying to put the fire out. Again...that's not an absolute. You need to check with an attorney fluent in self-defense law in your jurisdiction. A forcible in-progress rape is often a justifiable use of deadly force.
Even if you're within the law, all it takes is a State's Attorney or District Attorney who is anti-gun or on some social justice crusade or simply wants to make a name for himself in a run for higher political office which can make life miserable for you and ruin you financially.