This is now a library of C# code for use with Unity. This is Moving in 3D with arrow keys
.
This is really cool logic! Glad you found this out