I spent some time searching for ways or libraries to move a camera with the WASD keys but i could never find something, until now… I didn’t want to reinvent the wheel, and since Peasycam is one of the most popular camera libraries that exists, i tried to add more functionality to it, and named it First Person View Cam (FPSVCam)
And it works! Most of the time… there’s still a bug with the movement when the look-at direction is almost parallel with an axis. Would someone accept the challenge to find the bug and squash it? I know where to start searching but i am not an expert in trigonometry so there is something failing there…
Besides key movement, another feature Peasycam already offers and i found super useful is saving camera positions and jumping between them with a delay and movement interpolation. But it doesn’t make sense to re-create these position every time you start a new sketch. So i created an option to save these positions to a JSON file.
I am keeping this in Alpha version until i find that bug in the movement, so the homepage is a bit improvised for now. Hopefully soon this will be ready to go full live
PS: the bug is very likely to be after line 292, in the panning or rotation methods. Can you find it?