defining camera axis vector instead of camera target
7 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Hi
I'm trying to make a simulation of something like a "go pro" camera. In the simulation I have a 3d axes in which I have several geometries (spheres, boxes etc) spread all over and I want to walk in this "geometry world". Till now I can control the cam position, the "up" vector and the direction of the camera. Here is the problem: When I walk forward or backwards nothing appears to get closer or far. When I turn left or right the world's orientation changes good, but when it comes to see things getting closer and more far nothing happens. The reason is that in order to look forward all the time I must define a "camera terget" which is a very specific point in space, and make sure that its in the direction of my "face normal" This makes me a lot of trouble since every time I change my direction I need to define another new camera target point, and doing this will cause discontinuities in my view. It would be much easier if instead a cemera taget point I could have define only the camera's direction (view axis).
Any suggestions?
Thanks
0 Kommentare
Antworten (1)
Jan
am 2 Mai 2016
The view direction V is the vector from the camera position P to the camera target T:
V = T - P
If you want you can normalize it. Because both representations of the orientation are equivalent, I do not see, why using one would cause "discontinuities", while the other doesn't.
See:
Siehe auch
Kategorien
Mehr zu Camera Views finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!