Hi,
I am trying to control the current view with a 3D mouse. But atm I am missing some parameters from the camera.
Here are the things that I do know:
Station station = Project.ActiveProject as Station;
Vector3 lookAt = GraphicControl.ActiveGraphicControl.LookAt;
Vector3 lookFrom = GraphicControl.ActiveGraphicControl.LookFrom;
Camera myCam = new Camera();
station.Cameras.Add(myCam);
myCam.LookAt = lookAt; //change values here
myCam.LookFrom = lookFrom; //and here
GraphicControl.ActiveGraphicControl.SyncCamera(myCam, true, 0);
GraphicControl.ActiveGraphicControl.Camera = myCam;
So, theroretically I can move around in space changing the lookAt and lookFrom vectors. But where do I get the current ROTATION of the camera from?
I need this, because I want the following: e.g.
- Push 3D mouse in x-direction
→ current view moves right / left (which is not neccesarily x direction in world coordinates)
Which means: Depending on the current orientation of the camera I have to do a matrix transformation. How can I do this?
I hope you understand my problem.