# Enhanced Input: Flying

**URL:** <https://forums.unrealengine.com/t/enhanced-input-flying/2223744>\
**Category:** C++\
**Tags:** unreal-engine, question\
**Created:** [December 15, 2024, 11:30pm UTC](https://forums.unrealengine.com/t/enhanced-input-flying/2223744 "2024-12-15T23:30:06Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![chefwrex](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/chefwrex/32/1008110_2.png) [@chefwrex](https://forums.unrealengine.com/u/chefwrex)\
**Post date:** [December 15, 2024, 11:30pm UTC](https://forums.unrealengine.com/t/enhanced-input-flying/2223744/1 "2024-12-15T23:30:06Z")

</div>

I’ve been following tutorials and videos on putting together C++ and the Enhanced Input Plugin for 5.5. I’m trying to understand “Flying” or really just pressing a button to move the character along the Z Axis. Using some of the similar logic from the other functions I came up with this. I made it on the condition of IsFlying.

```auto
void APlayerCharacter::Fly(const FInputActionValue& Value)
{
	FVector InputVector = Value.Get<FVector>();
	FVector UpDirection = FVector::UpVector;
	
	isPlayerFlying = GetCharacterMovement()->IsFlying();
	
	if (IsValid(Controller))
	{
		if (isPlayerFlying)
		{
			AddMovementInput(UpDirection, InputVector.Z);
            UE_LOG(LogTemp, Warning, TEXT("InputVector: %s"), *InputVector.ToString());
			UE_LOG(LogTemp, Warning, TEXT("UpDirection: %s"), *UpDirection.ToString());
		}
	}
}

```

Information from ShowDebug EnhancedInput, and the logs. The Input vector reads as X Changing, but when I changed the InputVector to InputVector.X, the behavior is the same.

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/f/2/f/f2f4fe5e1aa84c3140472c62f2c56d57d0d30899.jpeg)  
 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/6/8/3/6837fcb15686586760f198ca6522e9442e251837.png)

Not sure where or what I’m missing.
