Analysis
やっと means “finally” used when something has been achieved after a lot of time or effort.
こっち means “this way“ or “this direction”. This is one of the kosoado words which are based on the physical distance between the speaker and the listener. So こっち means “this way towards the speaker”, そっち means “that way towards the listener”, あっち means “that way away from both the speaker and the listener” and どっち means “which way” used in a question.
向いた is the ta-form or casual past tense of the verb 向く meaning “to face” or “turn towards something”. So こっち向いた directly means “faced this way” which can be translated as “looked at me”. The を particle is omitted which often happens in casual speech.
Actually, the verb 向く is a tricky word as it can take the particle に as well. But in the sentence こっちを向く, を cannot be replaced with に and here is why:
Direction を向く is used when a subjective action is carried out with the one’s own volition. こっちに向く cannot be used as the action “to face this way” is a subjective action done by someone so the particle を is used.
On the other hand, Direction に向く is used for a state where there is no subjective or volitional action. For example, その窓は北に向いている meaning “The window faces north”. In this sentence, に is used as it’s a state of the window facing north and there is no subjective action.
However, を can also be used with non-volitional action when the speaker personifies something. For example, 花は枯れて下を向いている。meaning “A flower died and it’s facing down”. In this sentence, を is used even though it’s not a subjective action as you personify the flower. So if you personify the window, you can also say その窓は北を向いている.
It’s a bit complicated but basically only を is used for a volitional action and both に and を can be used for a state of being.