AMFP Enhanced
C++ reference: the code this unofficial fork added
Loading...
Searching...
No Matches
LuxMouseLook.h File Reference

mouse-look delta, free of engine types so it can be unit tested (tests/cpp/test_mouse_look.cpp). More...

#include <cmath>

Go to the source code of this file.

Functions

void LuxMouseLookDelta (int alRelX, int alRelY, float afMul, float afScreenHeight, bool abFix, float &afOutX, float &afOutY)
 Converts a relative mouse movement (pixels) into a look delta.

Variables

static const float kLuxMouseLookReferenceHeight = 1080.0f

Detailed Description

mouse-look delta, free of engine types so it can be unit tested (tests/cpp/test_mouse_look.cpp).

Definition in file LuxMouseLook.h.

Function Documentation

◆ LuxMouseLookDelta()

void LuxMouseLookDelta ( int alRelX,
int alRelY,
float afMul,
float afScreenHeight,
bool abFix,
float & afOutX,
float & afOutY )
inline

Converts a relative mouse movement (pixels) into a look delta.

afMul is the product of all sensitivity factors. abFix=false reproduces the stock exe exactly: it rounds the scaled movement to whole pixels and divides by 1.7 * the screen height.

Definition at line 20 of file LuxMouseLook.h.

Variable Documentation

◆ kLuxMouseLookReferenceHeight

const float kLuxMouseLookReferenceHeight = 1080.0f
static

Definition at line 12 of file LuxMouseLook.h.