Simulating small axis input does nothing

So I’m essentially I’m trying to record controller input so that I can play it back and make the character move the same way as it did when I was recording it.

problem is that if i lightly press on the thumbstick (lets say 0.1f value) the character moves slightly as it should but when I play that movement back with the same value the character does’t move.

e.g:

Record Phase : press left thumbstick lightly (0.1f) → character slightly moves → record value (0.1f)

Playback Phase : PlayerController->InputAxis 0.1f → character doesn’t move

The issue relates to the deadzone settings for the input however light touches work fine when im controlling it normally, but doesn’t work if i pass the input through code.

p.s this is only if the input is below deadzone, e.g 1.0 works fine for recording and playback

My guess would be that what you record is probably the adjusted value (NewVal - AxisProps->DeadZone) in UPlayerInput::MassageAxisInput and not the actual raw input value coming from the controller.

So let’s say your dead zone is 0.1f:

RECORD:
Raw Input: 0.2f => Process Input => 0.1f => Record => Recorded value = 0.1f.
PLAYBACK:
Raw Input: 0.1f => Process Input => 0.0f => Used input = 0.0f

As an easy test to know if this is the case, in your Playback Phase, just add the deadzone value to your recorded input and see what happens.

Good luck!

Mick

Adding the deadzone now makes him move because of course hes over the deadzone threshhold now but also makes him massively overshoot the movement

Although I believe you are right about me storing an altered version of the value I need, digging through the code I found that FKeyState has these variables:

/** This is the most recent raw value reported by the device.  For digital buttons, 0 or 1.  For analog buttons, 0->1.  For axes, -1->1. The X field is for non-vector keys */
	FVector RawValue;

	/** The final "value" for this control, after any optional processing. */
	FVector Value;

I’m using the GetInputAxisValue in order to fetch the axis values currently

Yeah, your “good” values will not get clamped, but those that fall in the dead zone will. I’m guessing storing the RawValue is what you want.

Any idea how I would go about fetching that raw value?, theres not a function that exposes it, it’s quite a mess of internal code that im trying to dig through to figure out how to fetch it

So the answer to this question is that yes, the the getinputaxis function returns a value after the deadzone has been accounted for (thanks to MickD777 for proposing that) and if you want the real value you need to use the GetRawKeyValue which is located in the UPlayerInput which can be fetched through the playercontroller.