Hi,
The position of the player is NOT its direction. Do you understand the difference? the position represent "where" it is in the 3d space, while you actually want to know where it looks.
so to rayCast properly, you need both the position of the ray AND its direction.
so, set the "from position" to the position of the user.
then you need to set the direction value: if you want to raycast in the z axis direction of the player, you will need to input in the direction "Vector3(0,0,1)"
Does that make sense?
bye,
Jean