Hey @Xaklse, there is an issue in 5.1 with this new Enhanced Input system. Whenever you’re walking on a planet surface, the direction vector, where the engine pushes the character, stays as if the landscape was flat. As a result, the more you travel, the harder for the character is to move forward, because the vector started pointing more and more to the space, up until it can’t move there at all.
The movement direction is calculated in this default function, added by the engine when I created C++ project.
void ASpaceoutCharacter::Move(const FInputActionValue& Value)
{
// input is a Vector2D
FVector2D MovementVector = Value.Get<FVector2D>();
if (Controller != nullptr)
{
// find out which way is forward
const FRotator Rotation = Controller->GetControlRotation();
const FRotator YawRotation(0, Rotation.Yaw, 0);
// get forward vector
const FVector ForwardDirection = FRotationMatrix(YawRotation).GetUnitAxis(EAxis::X);
// get right vector
const FVector RightDirection = FRotationMatrix(YawRotation).GetUnitAxis(EAxis::Y);
// add movement
AddMovementInput(ForwardDirection, MovementVector.Y);
AddMovementInput(RightDirection, MovementVector.X);
}
}
As you can see, there’s only Yaw taken into consideration. I’ve tried adding there Pitch, but according the debug lines that I drew, the movement direction stays the same (wrong) way. Any idea how to fix it?
Btw, your character input doesn’t work at all in the example map.