PDA

View Full Version : Q3DCamera Y axis rotation limit



baray98
25th June 2019, 23:37
I am using Q3DSurface and found that Y rotation is limited to 0 - 90 degrees while X can go from 0 - 380. How can I get my Y rotation to 0- 360 so I can spin my surface in any direction my user wants. I thought this will be some limit in Q3DCamera assigned to Q3DSurface. I can not find the limits though. Anybody?

sd
16th April 2021, 12:58
Hi,

I had the same trouble, the settings of the Y rotation is private so I couldn't get free movement with my Q3DSurface.
But the Q3DScatter allows this full movement ! So I just had to :
- create a Q3DScatter,
- permute the camera between the Q3DScatter and my Q3DSurface,
- delete the Q3DScatter.



Q3DScatter *myQ3DScatter = new Q3DScatter();
Q3DSurface *myQ3DSurface = new Q3DSurface();
Q3DCamera *cameraFromQ3DSurface = myQ3DSurface->scene()->activeCamera();
myQ3DSurface->scene()->setActiveCamera( myQ3DScatter->scene()->activeCamera() );
myQ3DScatter->scene()->setActiveCamera( cameraFromQ3DSurface );
delete myQ3DScatter;


That works just fine for me :)

Regards,

baray98
16th November 2023, 19:09
Kinda hacky but it work :) thanks this may help somebody else too