-
Hi again, This time, I'm trying to move the camera to a point with given coordinates. This point is a glm.fvec3 object with x, y and z values. I'm calling, as seen in the documentation, the function View.center(vec) : But what I see is that my scene does only move a little bit. To get the perfect position I want, I need to call this function multiple times, depending on the initial position (if the camera was far away, it can be something like 400 calls before gettingthe position I need). I can reduce the number of calls by calling in my loop center() then look() at the center of my scene :
But I still need between 40 to 100 calls to get the angle I need. Is that the expected behavior ? I thought by calling the function with, for example, a vector (10, 20, 30), we would immediately get the center of the camera being 10, 20, 30. Thanks a lot for you attention ! :) |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 5 replies
-
Hello again @Yarkane Are you sure you are not overriding your desired position afterward ? for instance if you reset in some way the camera center so that only the orientation remains then your added calls to |
Beta Was this translation helpful? Give feedback.
-
Thanks for you answer, here are more information :
FYI, these two codes give equivalent results (that are incorrect, so) :
So, the only "working" implementation was the one on the beginning of the discussion : center -> look -> center -> look etc etc... |
Beta Was this translation helpful? Give feedback.
Thanks for you answer, here are more information :
center()
place the camera to the correct position, as when I removelook()
, the position of the camera is at the right place : callingcenter()
a second time does not change anything, and I can rotate manually the camera so I get the view I wanted to have withlook()
.look()
specifically it's coherent.FYI, these two codes give equivalent results (that are incorrect, so) :