Download

How do you read the Input Mappings Scales at runtime?

These: 2e00f3eaf52db6fa02948d70ce53ee11a13ee588.jpeg

I thought I had it by using the Controller’s InputYawScale & InputPitchScale but they are giving me 2.5 & 1.75 respectively, not 2.0

Thanks in advance.

They should both be reaching 2, but either you have a threshold set up, or your joystick is configured to not reach it’s full input (or it is old).

Thanks Jamendxman3, they are reaching 2. I’m actually trying to find out what percentage of the way to 2 (or whatever number the scale will end up being set to) they are though. I need to expose the actual value in the mappings somehow.

34e1d5acae09adf1a93eaf3c2532ada751c01c37.jpeg

Oh, looks like I misunderstood your question. I am not aware of any way to do this via blueprints, I’d imagine that the Victory Plugin has something like this, but I’m not sure :\

No problem Jamendxman3. Thankyou for taking the time to help regardless; much appreciated.
I’m currently downloading visual studio so I can meander through UInputSettings, maybe make a custom node if it’s possible.
I shall take a look through Rama’s plugin while I’m waiting for the download to finish. Thanks again.

Please post back here if you figure it out.

Please post back here if you figure it out, but quick question, to make a custom node, do you have to compile and do a few other things? Or is there just a few large VS files that I can edit?

Hi Jamendxman3, I got this working last night. I just followed this video and figured the rest out on my own. It was rather painless all-in-all and consequently I think I’ll be doing a lot more C++ from now on.

Anyway, this is what I have at the moment (just to have something that works):



float UMyBlueprintFunctionLibrary::GetConfigLookUpScale(){
	float Scale;

	UInputSettings* Settings = const_cast<UInputSettings*>(GetDefault<UInputSettings>());
	if (!Settings) return false;

	TArray<FInputAxisKeyMapping>& Axes = Settings->AxisMappings;

	for (FInputAxisKeyMapping& Ea : Axes)
	{
		if (Ea.AxisName.ToString() == "LookUp")
		{
			Scale=Ea.Scale;
			break;
		}
	}
	
	return Scale;
}


UE4InputScales3.jpg

Works! :cool:

Ok, this is the one I’m going with. I’ve tidied it up a little & will leave this here to help out others that may wander through:
d3648559e7b9052f036d0b763b291ff47816bca5.jpeg

(.h File)


	GENERATED_BODY()
public:
	UFUNCTION(BlueprintPure, meta = (FriendlyName = "Get Config Input Axis Scale"), Category = "Config Info")
		static void GetConfigAxisScale(FString AxisName, bool& Found, float& Scale);


(.cpp File)


void UMyBlueprintFunctionLibrary::GetConfigAxisScale(FString AxisName, bool& Found, float& Scale){
	if (!AxisName.IsEmpty()){
		UInputSettings* Settings = const_cast<UInputSettings*>(GetDefault<UInputSettings>());
		if (Settings){
			for (FInputAxisKeyMapping& Axis : Settings->AxisMappings)
				if (Axis.AxisName.ToString().Equals(AxisName, ESearchCase::IgnoreCase))
				{
					Found = true;
					Scale = Axis.Scale;
					break;
				}
		}
	}
}