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

gamepad look response (Input tab: dead zone, look acceleration, separate X / Y speed). More...

#include <cmath>

Go to the source code of this file.

Classes

class  cLuxPadLookBoost
 Turning speed boost while the stick is held at full tilt (acceleration only). More...

Functions

float LuxPadLookAxis (float afValue, float afDeadZone, bool abAccel)
 One stick axis after the dead zone (rescaled so it starts from 0) and the response curve.

Variables

static const float kLuxLookCurveStock = 1.5f
static const float kLuxLookCurveAccel = 2.2f
static const float kLuxLookBoostDelay = 0.25f
static const float kLuxLookBoostRamp = 0.4f
static const float kLuxLookBoostMax = 1.8f
static const float kLuxLookBoostTilt = 0.92f

Detailed Description

gamepad look response (Input tab: dead zone, look acceleration, separate X / Y speed).

Pure math, unit tested in tests/cpp/test_pad_look.cpp.

Definition in file LuxPadLook.h.

Function Documentation

◆ LuxPadLookAxis()

float LuxPadLookAxis ( float afValue,
float afDeadZone,
bool abAccel )
inline

One stick axis after the dead zone (rescaled so it starts from 0) and the response curve.

Definition at line 18 of file LuxPadLook.h.

Variable Documentation

◆ kLuxLookCurveStock

const float kLuxLookCurveStock = 1.5f
static

Definition at line 10 of file LuxPadLook.h.

◆ kLuxLookCurveAccel

const float kLuxLookCurveAccel = 2.2f
static

Definition at line 11 of file LuxPadLook.h.

◆ kLuxLookBoostDelay

const float kLuxLookBoostDelay = 0.25f
static

Definition at line 12 of file LuxPadLook.h.

◆ kLuxLookBoostRamp

const float kLuxLookBoostRamp = 0.4f
static

Definition at line 13 of file LuxPadLook.h.

◆ kLuxLookBoostMax

const float kLuxLookBoostMax = 1.8f
static

Definition at line 14 of file LuxPadLook.h.

◆ kLuxLookBoostTilt

const float kLuxLookBoostTilt = 0.92f
static

Definition at line 15 of file LuxPadLook.h.