-
Notifications
You must be signed in to change notification settings - Fork 312
camera.FlyControl for highly configurable FPS or flight-sim style camera control #266
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
…t/space sim style camera control.
|
One thing to add would be a way to use the constraints to restrict translational movement to a plane (eg XY). |
|
I would really love to have that integrated. I know it's been a long time, but if you're still motivated, could you add a use case so we could see it in actions like in the demos? To see how to use the API. |
|
Yea, I can do that, or at the very least put up a gist. I think I was testing it using the g3n OBJ viewer example... if I can find it in my src dir. |
Amazing that you're still available and still motivated to keep that going… Thanks! |
|
here's a fork of the demos repo with the changes i had made to the "view" demo to use FlyCamera. I suppose to build it, you'll have to add a replacement of g3n to your local repo. Something like It's mostly a drop-in replacement for the orbit control, due to the camera control interface. I couldn't build it now on my current (windows) machine because my mingw64 appears to lack a couple dlls. And I'm also missing a lib in WSL so I also couldn't launch the linux binary I had built years ago. |
|
That's amazing! Thank you so much. Do you know what's acting up? |
|
That seems familiar, but I don't recall anything specific and I don't see any thing I changed in my copy of the demo to prevent that. Have you tried loading a model from the cmd line when launching the exe? I wonder if the gui is stealing focus or something like that. I'll try to investigate a little more in the next few days. |
|
Sorry to take so much time. I checked, and in fact, the file selector seems to have stolen the focus and doesn't allow the fly control to work. So I guess, for me, it works. @danaugrs : could you have a look and maybe merge this? |
Finally following up to #124 on my ancient promises of an alternative camera control to Orbit. I see there is also PR #196 and #262 for something similar.
I used a series of maps to allow the user to configure the keys, mouse, speeds, and constraints. Translation, Yaw, Pitch, Roll, FoV Zoom are available, and pitching is not restricted to [-90, 90] from world up.
I tried to describe the use of
FlyControlas succinctly as possible in its documentation: