Answer the question
In order to leave comments, you need to log in
How to zoom in on an object in QML?
The task is to make a 3dviewer using QML. I figured out how to open a 3d model, set up the light, scene, but I don’t understand how to zoom in and out of the camera from the model.
For example, to change the position of the camera vertically and horizontally, the following parameters are used: panAboutViewCenter , tiltAboutViewCenter . But, for the approximation did not find anything.
Perhaps someone has done something similar and knows how to implement this functionality?
Answer the question
In order to leave comments, you need to log in
Although, I think I already found the answer. Zooming occurs when the fieldOfView
parameter changes . The documentation says that this is a change in the camera's viewing angle, but this option suits me. If there are better options, please correct me.
Thanks!)
You also have a position property.
Position actually moves the camera (viewer) to the object. fieldOfView is if you hold binoculars to your eyes and change the lens with a different viewing angle. The effects are similar. What you need - decide for yourself. For example, in a hall, a camera that does not move, but only changes the viewing angle, of course, there is a feeling of collision with an object.
The difference will be during the rotation of the camera, because. the axis of rotation is at position.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question