Can I reverse the mouse movement direction of a FirstPersonCamera
#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
  


Messages In This Thread
RE: Can I reverse the mouse movement direction of a FirstPersonCamera - by abenedik - 04-15-2019, 02:58 PM

Forum Jump:


Users browsing this thread:
1 Guest(s)