Reset camera on Zoom

Anonymous 9 years ago 0
This discussion was imported from CodePlex

JohnSourcer wrote at 2013-01-23 11:41:

Hi All,

I configure a camera at a sphere as follows, but when I zoom and then rotate it, it no longer rotates the sphere but seems to remember the original axis and rotates around that. Do I have to reset it or is there some way of always making sure it rotates around the center of the sphere:

view = sender as HelixViewport3D;
CameraController cameraController = view.CameraController;
cameraController.IsPanEnabled = false;
cameraController.CameraRotationMode = CameraRotationMode.Turntable;
cameraController.TouchMode = TouchMode.Rotating;
cameraController.CameraMode = CameraMode.Inspect;
cameraController.InertiaFactor = 0.5;



objo wrote at 2013-01-23 20:25:

Maybe the up axis (the ModelUpDirection property) should be changed to 0,1,0? (in this toolkit the default up axis is 0,0,1) 

JohnSourcer wrote at 2013-01-24 12:27:

Thanks for the reply, objo.

Sadly that doesn't help. You can observe this behaviour in your Earth Demo. If you start infinite spin rotation on the globe, stop it, scale the globe (down or up) and then start infinite spin again. 

BTW, this is an excellent bit of work. I know others have mentioned this but I too would be happy to pay for it. Reasonably ;)