When Does a Defensive Player Establish a Legal Guarding Position?

When they are in a legal guarding position (Their LGP) which is both feet on the floor and facing the player they are guarding with their body.