camtarget resets when using mouse to rotate 3D figure

4 visualizzazioni (ultimi 30 giorni)
Often when I have a 3D plot, I want to zoom in on some feature and view it from different angles. Currently, I:
  • click the rotate tool
  • rotate the figure to where I think it will be useful
  • click the zoom tool
  • zoom in until I get close enough
  • double click to reset the view
  • repeat
The reason for resetting each time is that once zoomed in, using the rotate tool to gain another perspective often rotates the object of interest far out of view. As I understand, this is because the camera center is not set to the location of the object of interest. (This makes sense, although Matlab might assume that it is in the center of the panel I have zoomed in on, maybe with some estimate of depth?)
The apparent solution is to set camtarget to the location of the object of interest. camtarget([0.2, 0.3, 5])
However, for some reason camtarget is reset when you use the rotate tool to rotate the figure. This seems like a bug.
I searched for some way to change this resetting behavior. I thought it might be changing the camtargetMODE, but using the rotate tool resets this too.
Any help is much appreciated. Cheers- John

Risposte (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by