Original Post
hi ppl...
in case this was just asked a while ago:
i cant search the forum, (timeout error)
here''s the story
i have an old 3d-engine, which i wanted to convert to
direct-3d and open-gl... i felt quite comfortable with it
UNTIL NOW
reviewing the camera-code i found an ugly workaround
for the problem...
i use 2 vertices (and 3 floats) for the camera
1 vertex is the position
1 vertex is the look-at
the floats are the rotation angles
with both vertices i calculate the up, right and front
vector for the camera-matrix.. i think i calculate the camera in
the standart fashion, but to be sure, there''s the "code"
(front=look-at-position normalized)
(up=calculated with sin/cos from roll-angle)
(right=cross product of front&up normalized)
(up=recalculated cross product of front&right normalized)
this works really fine, but if the front-vector is the
world-y-axis, it produces 0/0/0 for the up-vector (or
right-vector, i can choose ;-))
my workaround was an if-then for every camera-change
but i think this sucks a lot !
is there any cool workaround for it ?
and another question
how can i calculate a matrix from lens-info (for example F=24mm) of a real camera ?
so long
torsten
camera,