🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

How to transfer desktop sensitivity to web?

Started by
1 comment, last by Shaarigan 3 years, 10 months ago

Hi everyone, i'm making a simple aim trainer like Aimlab but in web, using THREE.js and have no experience in developing anything for desktop. I want user to be able to set sensitivity in game and the best option is probably to make it equal to Source engine (any other game/engine sens is fine too, since there's a ton of sensitivity converters). But the problem is, i have no idea how mouse input works in desktop and what data game receives from OS and googling didn't really help with that. Source engine has m_pitch and m_yaw - multipliers for horizontal and vertical sensitivity, but what do they multiply to?

Advertisement

Mouse movement in a typical game is always relative to the previous position. Some games pin the mouse to the center in different view modes, some games don't but use an OS API to do so. What you get is a vector from your last position to the current one and this is applied to the camera of the game in form of for example quaternion values to rotate your camera in different directions related to the mouse movement.

This values are what you usually calibrate

This topic is closed to new replies.

Advertisement