detect which surface touching by raycast

hi guys. im trying to do build block mode something like in minecraft.

my problem is blocks are not align at the same line. for doing this i need to findout ray touching the which surface of the existed block.

my script working with sendmessage:

if( == "stoneBlock(Clone)"){
     		gui.yazi = "Block";
     		 hit.transform.SendMessage("position", 1);

and receiver for now:

function position(i:int){
	if(i == 1){

any ideas for receiver?

Get the collision vector from the Hit.

Compare it to the forward vector of the block’s transform.