how to get enhanced Input InputActionValue In c++?

11

FInputActionValue is a struct that contains whatever values are in your IA.

You can call .Get<>() on your struct.

Example:

void Move(const FInputActionValue& Value) 
{
    float moveValue = Value.Get<float>();
}

void Move(const FInputActionValue& Value)
{
    FVector2D moveValue = Value.Get<FVector2D>();
    float X = moveValue.X;
    float Y = moveValue.Y;
}
2 Likes

thank you,
But what I want is to know the value of InputActionValue in a function, not a bound function.

for example

Before Unreal 5.1