you told me to put my actor in the sphere and check the collision between the map and the sphere if there is any collision that mean there is a block
no,no, what i said is you have to move that sphere from player1 position to player2 using a linear path and in steps unit you think best, and for each step check sphere collision.

Actually It is like shooting an imaginary bullet from pos1 to pos2 checking the whole path in the same frame. Maybe you think that is much work, but it is called ray intersect and it is a very commun procedure in video games, please check this:

http://en.wikipedia.org/wiki/Line_of_sight_%28gaming%29


ike for example it must give me 600 , so I'll put the depth of the cube 600 in this case the Cube will start from player1 and end in player2 , but it's give me 815 for that it start from player1 and end after player2 .
If player1 position and player2 position are z axis aligned (like (10,20,200)-(10,20,50) same xy but different Z), then distance is just the z difference between positions, but is they are not axis aligned, (for example a diagonal line from pos1 to pos2 then the distance result is not calculated just using z difference.