'm trying to move an orthographic camera following a plane with forward and backward buttons. It’s already almost functional but I have a problem moving the camera backwards. I don’t know what the problem can be (I’m a bit new in three.js and computer graphics), The backward button does the same than the fordward.
The idea behind this is to clik on lines and poligons, create a plane from them and then set the camera to have a view of perpendicular to the plane created (like a slice). The code is the step zero of that. If you know a better way please guide me.
If you only change Plane.constant, you can compute the new camera position with Plane.normal. It’s also not necessary to update the projection matrix if you just transform the camera in 3D space.