Navigation functionality for 3D Processing models

Having failed to find a useful working example of a Processing script that incorporates typical navigation functionality into a 3D model, I’ve had to develop one myself for a project I’m working on. Although not rocket science (3D developers will of course know all this), I found the mathematics slightly tricky and it took a while to crack. The script is available at openprocessing.org in case it helps anyone save some time. The code is work in progress and as it stands doesn’t support multiple current key strokes, but I’ll update this along the way. Click on the image to try it out.

nav3d