3D custom physics raycasting player

Hi.
First of all, please use Code tags
** Using code tags properly .**

This thread belongs to scripting, so I have requested to be moved.

Please post which part of the code does not work and what is expected.
If you have any error, post them.
Use Debug.Log and Breakpoints, to find bugs.

On side note, why can you not use existing controllers? There is plenty on the asset store.
Studying them and learning from them could be good starting point for you.