Camera Settings

Feb 10, 2013 at 6:08 AM
Sir, Can you please tell me how to manipulate camera. I want to change lots of things in the default camera. Like
  1. the camera rotation should be done programmatically not mouse.
  2. the camera rotates along only y-axis.
  3. the axis of rotation can be changed.
And, also this thing returns NULL == > myHelixViewPort.CameraController.

Please, it's really very urgent. And thank you for such an awesome product.
Feb 10, 2013 at 4:11 PM
Wish I could help you, but I don't think this is within the scope of this library. But constraints on the camera position/look direction is planned (issue 9979 and 9961).
Maybe animations of the camera properties can help in your case, see msdn.

The CameraController is null until the control template is applied. Should not be null after that. Maybe you try to access the property too early?
Feb 11, 2013 at 3:07 PM
Thanks for the reply,
I solved my first problem by simulating mouse inputs ... but I am still not able to understand when should I try to access property ....
This was the code
public partial class MainWindow : Window
        public MainWindow()
            CameraController controller = this.myViewPort3D.CameraController;
            if(controller == null)   Console.WriteLine("Controller is null");
            DataContext = this;
and the output is "controller is null". When should I access this property , I am just a beginner. I am not able to figure out whether ControlTemplate is applied or not . Please answer
Feb 11, 2013 at 4:52 PM
Edited Feb 11, 2013 at 4:53 PM
Wait until the Window is loaded. Subscribe to the Loaded event on the Window:
Feb 11, 2013 at 5:42 PM
Ohh, thank you so much. I extended the library and modified some Visuals so easily. Thanks for such a good product.