ULimenMouseSensitivityComponent
Overview
ULimenMouseSensitivityComponent is an actor component that allows for setting and getting mouse sensitivity parameters. It provides functionality to invert axes and broadcast updates through a delegate.
Properties
Type | Name | Access | Description |
|---|---|---|---|
| MouseParameters | Protected | Stores the current mouse sensitivity parameters. |
Functions
Return Type | Signature | Description |
|---|---|---|
| SetMouseParameters(const FMouseParameters& InNewParams) | Sets new mouse parameters and broadcasts an update. |
| SetSensitivity(const float Sensitivity) | Sets the sensitivity for both axes and broadcasts an update. |
| SetInvertAxis(const bool bInvertX, const bool bInvertY) | Inverts the specified axes and broadcasts an update. |
| GetMouseX() const | Returns the current mouse sensitivity on the X-axis. |
| GetInvertMouseX() const | Returns whether the X-axis is inverted. |
| GetMouseY() const | Returns the current mouse sensitivity on the Y-axis. |
| GetInvertMouseY() const | Returns whether the Y-axis is inverted. |
| GetMouseXY() const | Returns the average mouse sensitivity if both axes are equal, otherwise returns NaN. |
| GetMouseParameters() const | Returns a reference to the current mouse parameters. |
Usage & Implementation Notes
The component uses a delegate (
FMouseSensitivityUpdate) to notify when the sensitivity is updated.The
SetMouseParameters,SetSensitivity, andSetInvertAxisfunctions update the internal state and broadcast an event.The
GetMouseXYfunction ensures that both axes have the same sensitivity before returning it; otherwise, it returns NaN.