thanks to griffpach for raycast tutorial and you can use the code in this for you projects and modify it as pleased also it is still a work in progress.