# Mouse move settings for First-person cam (universal camera)

**URL:** <https://forum.babylonjs.com/t/mouse-move-settings-for-first-person-cam-universal-camera/39994>\
**Category:** Questions\
**Tags:** camera\
**Created:** [April 19, 2023, 8:12am UTC](https://forum.babylonjs.com/t/mouse-move-settings-for-first-person-cam-universal-camera/39994 "2023-04-19T08:12:07Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![mawa](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/mawa/32/12384_2.png) [@mawa](https://forum.babylonjs.com/u/mawa)\
**Post date:** [April 19, 2023, 8:12am UTC](https://forum.babylonjs.com/t/mouse-move-settings-for-first-person-cam-universal-camera/39994/1 "2023-04-19T08:12:07Z")

</div>

Dears,

This will be my first project using a first-person camera and it looks like I’m struggling a little finding some of the parameters I would expect for mouse (move) input.  
Being a gamer, there are two parameters for mouse movement I always set in an FPS.

Those are:

1. Independant horizontal and vertical mouse sensitivity/sensibility.
2. Mouse acceleration.

Now, I find mouse acceleration to work only with the follow cam and I’m used to set ‘angularSensibilityX’ and ‘angularSensibilityY’ on the arcRotateCamera.

But then, these don’t seem to apply to the universalCamera. I would have expected to be able to set these parameters as I find them to be kind of common (not to say basic) in the games I play.  
Or I should set them elsewhere?

Thanks in advance for your help and meanwhile, have a great day 🕶

---

<div class="post-metadata">

**Author:** ![CodingCrusader](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/codingcrusader/32/29857_2.png) [@CodingCrusader](https://forum.babylonjs.com/u/CodingCrusader)\
**Post date:** [April 19, 2023, 9:27am UTC](https://forum.babylonjs.com/t/mouse-move-settings-for-first-person-cam-universal-camera/39994/2 "2023-04-19T09:27:51Z")

</div>

I found this uncompleted example of a UniversalCamera  
[VIRTUALJOYSTICK GUI | Babylon.js Playground (babylonjs.com)](https://playground.babylonjs.com/#00RAJA#30)

I hope it helps a bit

```auto
var createCamera=function(scene){
BABYLON.Vector3.Zero(), scene);
     camera = new BABYLON.UniversalCamera
    ("camera1", new BABYLON.Vector3(0, 5, -10), scene);
    camera.setTarget(BABYLON.Vector3.Zero());

    // This attaches the camera to the canvas
    camera.attachControl(canvas, true);
    camera.inputs.add(camera.inputs.attached.touch);
    camera.speed = 0;

    camera.touchAngularSensibility = 12000;
    camera.inputs.addMouseWheel();
    camera.touchMoveSensibility=500;
    camera.pinchPrecision = 80;
    //camera.panningSensibility = 80;
    camera.useNaturalPinchZoom = true;

    camera.inputs.attached.mousewheel.wheelPrecisionX = 0.2;
    camera.inputs.attached.mousewheel.wheelPrecisionY = 0.2;
    camera.inputs.attached.mousewheel.wheelPrecisionZ = 0.2;

    camera.inputs.checkInputs = false;
}

```

---

<div class="post-metadata">

**Author:** ![mawa](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/mawa/32/12384_2.png) [@mawa](https://forum.babylonjs.com/u/mawa)\
**Post date:** [April 19, 2023, 9:54am UTC](https://forum.babylonjs.com/t/mouse-move-settings-for-first-person-cam-universal-camera/39994/3 "2023-04-19T09:54:21Z")

</div>

Thanks for trying but no, not this time 🤗  
My question really is just for:  
A separate sensitivity/sensibility on the vertical and horizontal move and if it somehow exists,  
A mouse acceleration (factor) for the mouse movement.  
And then eventually for touch also.  
I (sort of) know about the other parameters.  
But again, thanks a lot for taking the time to have a look and reply and have a great day 🕶

---

<div class="post-metadata">

**Author:** ![CodingCrusader](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/codingcrusader/32/29857_2.png) [@CodingCrusader](https://forum.babylonjs.com/u/CodingCrusader)\
**Post date:** [April 19, 2023, 10:04am UTC](https://forum.babylonjs.com/t/mouse-move-settings-for-first-person-cam-universal-camera/39994/4 "2023-04-19T10:04:27Z")

</div>

At least I pushed your request to the top! 🤪

---

<div class="post-metadata">

**Author:** ![carolhmj](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/carolhmj/32/25918_2.png) [@carolhmj](https://forum.babylonjs.com/u/carolhmj)\
**Post date:** [April 19, 2023, 11:29am UTC](https://forum.babylonjs.com/t/mouse-move-settings-for-first-person-cam-universal-camera/39994/5 "2023-04-19T11:29:57Z")

</div>

cc @PolygonalSun

---

<div class="post-metadata">

**Author:** ![PolygonalSun](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/polygonalsun/32/2704_2.png) [@PolygonalSun](https://forum.babylonjs.com/u/PolygonalSun)\
**Post date:** [April 19, 2023, 5:14pm UTC](https://forum.babylonjs.com/t/mouse-move-settings-for-first-person-cam-universal-camera/39994/6 "2023-04-19T17:14:24Z")

</div>

Hey @mawa,  
AFAIK, the `UniversalCamera` uses the `FreeCamera` inputs which only have the single variable `angularSensibility`. The input could be changed to have separate axis values. I could also see creating a new input that extends `FreeCameraMouseInput` and just overrides the attachControl function.

---

<div class="post-metadata">

**Author:** ![PolygonalSun](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/polygonalsun/32/2704_2.png) [@PolygonalSun](https://forum.babylonjs.com/u/PolygonalSun)\
**Post date:** [April 19, 2023, 5:35pm UTC](https://forum.babylonjs.com/t/mouse-move-settings-for-first-person-cam-universal-camera/39994/7 "2023-04-19T17:35:01Z")

</div>

Here’s a sort of hacky way to do what I described above: [Separate Axes | Babylon.js Playground (babylonjs.com)](https://playground.babylonjs.com/#7SHS9J)

---

<div class="post-metadata">

**Author:** ![mawa](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/mawa/32/12384_2.png) [@mawa](https://forum.babylonjs.com/u/mawa)\
**Post date:** [April 21, 2023, 8:02am UTC](https://forum.babylonjs.com/t/mouse-move-settings-for-first-person-cam-universal-camera/39994/8 "2023-04-21T08:02:06Z")

</div>

Thanks so much for your reply and the quick go-around ‘hack’. Not sure if I will use it; I’m not making an FPS so it’s not absolute necessity for me just now.  
May be others will still want to have the ‘less hacky’ solution? 🤔 We’ll see.  
Right now, I’m good just like that so I think we could just leave it here for now.  
Thanks again and have a great day 🕶
