We are about to switch to a new forum software. Until then we have removed the registration on this forum.
So I've tried the default camera, OCD, PeasyCam, and even tried Proscene, but QueasyCam gives me the best results for my program. However, it does not have the built in ability to rotate (roll) the camera and I'm not sure how to go about giving it that feature.
Thank you!
(my appologies to the mods for not putting this Q on the correct board to begin with)
Answers
Look at examplesfor queasy
Write a mail to the author of the lib
from that link:
tilt = a float value that represents the rotation of the camera around the horizontal axis
is that not the same thing?
So I tried it and this is what I got:
Pan rotates the camera view left or right. If you want to cross a street, you want to use pan.
Tilt rotates the camera up and down. If you want to see your feet, you use tilt.
Then I tried a combination of tilt and pan in order to fool the system and to change the axis of rotation. For example. Tilt +90 follow by pan +45 follow by tilt -90. QueasyCam applies all those actions independently to each other. So, nop, you cannot get roll based on the provided documentation. Maybe there are extra functions in the library not documented? You can approach the owner of the repo and ask him, as @Chrisir has suggested or generate a new code. You could explore previous posts and I am sure somebody has tried this before. They are easy to find sometimes...
Check these posts for example:
https://forum.processing.org/two/discussion/comment/27272/#Comment_27272
https://forum.processing.org/two/discussion/20235/align-box-with-vector
Kf
Ah ok, so tilt is pitch and pan is yaw but there is no roll. Maybe that's by design, given the first person view.
The code is all there at github but i don't profess to understand it.
And if you rotate the entire scene to get roll?
A simple test shows it is possible by calling rotateZ(). However I don't think it will work without integrating the calls to the source code, or at least understanding the core concepts. I might be wrong and further testing is needed.
Kf
Quesycam does not implement roll.
You can see the implementation of pan and tilt here:
You could fork the library, add
roll
for your own purposes, and submit a pull request.It looks like the key issue is that
forward
is defined based onpan
andtilt
(makes sense) but that if you addroll
then you will need to incorporate that into the definitions ofright
andup
. Those three (forward, right, up) are then used to construct the camera.