Can I reverse the mouse movement direction of a FirstPersonCamera
#1
Can I reverse the mouse movement direction of a FirstPersonCamera?  I need to use a FirstPersonCamera, but I'd like to have the scene move with the mouse as a TargetPostionCamera does, as opposed to the camera move with the mouse.  Moving the scene seems more intuitive to me.
#2
You can reverse the direction of camera rotation with setting IsXAxisInverted on MouseCameraController to true.

If you want to reverse the direction of camera movement, then you need to derive your class from MouseCameraController and override the MoveCamera method - for example:

PHP Code:
   public class MyMouseCameraController MouseCameraController
    
{
 
       public override void MoveCamera(double mouseDxdouble mouseDy)
 
       {
 
           // Reverse x movement direction
 
           mouseDx = -mouseDx;

 
           base.MoveCamera(mouseDxmouseDy);
 
       }

 
       //public override void RotateCamera(double mouseDx, double mouseDy)
 
       //{
 
       //    base.RotateCamera(mouseDx, mouseDy);
 
       //}
 
   

As you see, you can also provide your own logic for camera rotation with overriding the RotateCamera.
Andrej Benedik
  


Forum Jump:


Users browsing this thread:
1 Guest(s)