Closed shmutalov closed 7 years ago
I did mistake. As I see perspective camera already implemented. Ok, we need just FirstPersonControls. I got that job, it is in progress now.
@shmutalov Is this still in progress?
No. I didnt get the success in doing that :(
@alteous I had some problems with this too. I would ask you, but you seems a little bit busy with gltf now. I will make another try a bit later.
I have a first person camera implemented in the gltf example right now, but it uses the QE / RF keys to yaw / pitch respectively. When gltf support is finished I'll try to replace QE / RF with mouse controls instead.
@alteous great!
@alteous I think, for the first time hardcoded keys is good, but we need to give the user provide custom keys for controlling the camera:
let cam = FPS.left_right(key::A, key::D).forward_backward(key::W, key::S);
^ something like that
First person camera has been implemented
I am requesting for perspective/fps camera support in the three-rs. Also WASD+mouse look like movement template will be good
Three-js have a PerspectiveCamera class: https://github.com/mrdoob/three.js/blob/dev/src/cameras/PerspectiveCamera.js
There is also example for using three-js perspective camera with FPS controls: https://github.com/josdirksen/learning-threejs/blob/master/chapter-09/07-first-person-camera.html