Does Tobi control his teleportation consciously? When Tobi uses his selective teleportation power that causes objects to pass through him, does he have to think about it when he does it, or is it automatic?  I'm trying to find out if he is vulnerable to a sneak attack.

I know he is able to teleport at will, but I'm wondering more about his "ghost" ability that causes objects to pass through him.
I'm thinking that it is voluntary, since he uses his Magekyou to do it, and it is the same technique as Kakashi's. 

Also because he is able to quickly change between using (to dodge an attack) and not using it (to attack someone). Furthermore, Naruto headbutted him and he did not dodge it.

Later, Naruto hits him with a rasengan, breaking his mask and revealing his identity as Obito. Although he was 'trapped' (because of the Bijuu-dama) on the other dimension, if it were automatic, I'm guessing he wouldn't have been able to not dodge it, being fried by the Bijuu-dama 'back here'.

EDIT:
Although I say voluntary, it may be seen as semi-automatic (or even automatic, for that matter), in the sense that he does not actually think about it, but rather acts instinctively. However, I think it is triggered by his will, and not entirely automatic.