Jump to content

FreeCamera Angular Sensibility


srimshady
 Share

Recommended Posts

Hey guys I have a quick question. How does babylon.js get its angular sensibility value? I need to precisely recreate a mouse sensitivity with freecamera from another fps game. For example, CS:GO multiplies the sensitivity by .022 to get it's sensitivity. What does babylon do to get it's default sens? Also, how does the fov value work? Let's say I want a vertical fov of 74, what would I set it to on the camera? .74? Thank you guys for any help.

Link to comment
Share on other sites

Hello freeCamera.angularSensibility is what you may want to check (it is a divider so mouse movements are divided by 2000 by default)

 

for fov, it is on camera.fov and it is a radian value

Ya I know about the angularSensibility. However it is not equating to the same mouse movement I'm getting in other games. If I set Unity 3D 5's sensitivity to 10, it is much less than if set angularSensibility to 10 or 100. Basically any simple ratio it doesn't really equate between any game and babylon . So how does it get it's value for sensitivity? Also, if I set fov to 1.29154, will that be 74 degrees fov vertically (as in the horizontal fov will change depending on aspect ratio)? Thanks for any help.

Link to comment
Share on other sites

angularSensibility is an "arbitrary" value (we got it simply by trying and applying the one that work the best in most cases), you can set the value that fits your needs but you can't compare this sensibility with other game engine camera movement sensibility (each engine has it's own "internal way of defining things").

 

Concerning horizontal or vertical fov , you can specifiy the way you want it to be with :or

camera.fovMode = BABYLON.Camera.FOVMODE_VERTICAL_FIXED or BABYLON.Camera.FOVMODE_VERTICAL_FIXED

(code related : https://github.com/BabylonJS/Babylon.js/pull/392 )

Link to comment
Share on other sites

angularSensibility is an "arbitrary" value (we got it simply by trying and applying the one that work the best in most cases), you can set the value that fits your needs but you can't compare this sensibility with other game engine camera movement sensibility (each engine has it's own "internal way of defining things").

 

Concerning horizontal or vertical fov , you can specifiy the way you want it to be with :or

camera.fovMode = BABYLON.Camera.FOVMODE_VERTICAL_FIXED or BABYLON.Camera.FOVMODE_VERTICAL_FIXED

(code related : https://github.com/BabylonJS/Babylon.js/pull/392 )

After a while of testing i figured out how to set angular sensibility to be the exact same as the game I wanted. Thank you for the fov info!

Link to comment
Share on other sites

As you can tell I'm very new to gamedev with js. How would I go about extending/modifying this class to use in my project. Thanks for any help for this noob.

 

You can simply get the JS file, modify it as you need, and load your modified file just after the babylon.js loading in your HTML page.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...