defining camera axis vector instead of camera target
7 views (last 30 days)
Show older comments
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 Comments
Answers (1)
Jan
on 2 May 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:
See Also
Categories
Find more on Camera Views in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!