I am trying to move the perspective of the rendered 3D scene in RGL after calling plot_3d
in rayshader. I don't have a middle click on my computer, just left and right. When I open RGL using for example plot(las)
to plot a lidR
point cloud, I can use Shift + Right Click and drag to change perspective. However, in the RGL spawned by plot_3d
I can't figure out how to do this.
How to change perspective in Rayshader RGL without a middle mouse button?
32 Views Asked by Max Ogden At
1
rayshader::plot_3d
setsrgl::par3d("mouseMode")
toOn my system (a Macbook Air with a trackpad and no mouse) I seem to have it configured so right and middle buttons are not available, but two finger drags on the trackpad are seen as mouse wheel rotation. I also hate the
"polar"
mouse control, so if I wanted to be able to rotate the scene and also change the field of view (but lose zoom), I could change it usingand then clicking and dragging rotates the scene, while a two finger drag (no click necessary) changes the FOV. Your system may map mouse modes differently, so experiment.
According to the
?rayshader::plot_3d
help page, once you have it right and have the desired settings inmm
, you can use them for a new plot withHowever, the line that would implement that appears to be commented out in the source code: https://github.com/tylermorganwall/rayshader/blob/81f95cf24973049f84f4a4250daa9b0b4659281d/R/plot_3d.R#L356