Hi Eceryone!
I’m trying to follow this tutorial, about an fps controller: A new, community-hosted Unreal Engine Wiki - Announcements - Unreal Engine Forums
And when coding the movements
if ((Controller != NULL) && (value != 0.0f))
{
// find out which way is forward
FRotator Rotation = Controller->GetControlRotation();
// Limit pitch when walking or falling
if (CharacterMovement->IsMovingOnGround() || CharacterMovement->IsFalling())
{
Rotation.Pitch = 0.0f;
}
// add movement in that direction
const FVector Direction = FRotationMatrix(Rotation).GetScaledAxis(EAxis::X);
AddMovementInput(Direction, value);
}
I’m having troubles with CharacterMovement (I have my own class AFPSCharacter : public ACharacter )
Who inherits from ACharacter, but the CharacterMovements seem to be Private, and if i use the getter GetCharacterMovementComponent, it returns a PawnCharacterMovement.
How could i fix this code? Any hints would be really appreciated!
Thanks in advance!