Hi everyone,
I did a little study of the playcanvas editor camera code, and derived my own camera handling scripts.
I have prepared 5 scripts that can be applied to a camera type object: flyCamera (allows you to move around the scene using the WASD keys or the arrow keys + RF or page up / down to move up and down); lookCamera (allows you to look around by clicking with the left mouse button); orbitCamera (allows you to rotate the view around the center of the scene by clicking with the left mouse button together with the Shift key); panCamera (allows you to move the view up / down / left / right by clicking with the left mouse button together with the Control key); zoomCamera (allows you to zoom in / out to the position of the mouse pointer by rotating the mouse wheel).
While these scripts largely cover my needs, I’d like to finish the job to make them available to everyone … but unfortunately I don’t have the math skills to finish.
To be complete, the handling of the camera roll (which I thought of inserting in the lookCamera script, by pressing the E and Q keys to roll clockwise and counterclockwise) and all the analogous part relating to the handling of the orthographic perspective would be missing.
If someone wanted to try their hand at completing what is missing it would be fantastic and I think it is also useful to many.
The project can be found here: PlayCanvas 3D HTML5 Game Engine
Thank you all for your attention and for any help