That requires work outside of 3DObject, I suggest looking at the C3 first person platformer example included in C3 example browser.