I've wondered how this works (since no one actually uses darts, I haven't had a chance to try it). Do you aim over the cover and in the general direction of the marked vehicle, or can you literally just aim anywhere and it will find the vehicle?
You aim at the target (it's visible on your HUD, you can aim at the box through walls etc, no line of site required) for a few seconds. When you have a lock you'll see a distance appear on your HUD. Then you can fire in any direction and the rocket will seek the target. It has a pretty good turn radius, in most cases I end up firing straight up into the air over walls, trees, etc. This won't work if you're too close.
Oh, and once you have a lock you can look in any direction without losing the lock.
Edit - also if you're frustrated that no one uses the dart, use it yourself
I find engineer + dart gun is a great combo. You usually get two rockets off before the dart "expires". Enough to kill most vehicles if you hit them right. Problem is enemy engineers can do a significant amount of repairing in the time it takes to reload the rocket. Having two engineers attacking one vehicle is an extremely deadly combo.