Thanks a ton for the code, and don't worry I won't do any credits now that you told me not to.
So I pasted the script into my PlayerController script, and the thing I'm using for the script, the Unity MonoDevelop, seems to have a problem with the 'var' in 'public var distance = 10;' and this seems to produce 3 different errors. When I hover my cursor over the red line underneath the 'var' it says "unexpected symbol 'var' expecting 'class', 'delegate', 'enum', 'interface', 'partial', or 'struct'" so my question is, which one should I pick and try out for this instance and this script: class, delegate, enum, interface, partial, or struct?
Also, am I supposed to attach this script to the PlayerController script? Did I get that right?
Thanks again help forum buddy! [-=
PS can I give you credit for all the code and help you gave me as far as just telling people, like when I say 'hey I made this little game' can I add something like 'but I couldn't have done it without so-and-so's help from the help forum'?