#[77. Character Camera and SpringArm] Camera not moving when switching to Character class

8 messages · Page 1 of 1 (latest)

orchid anvil
#

Hello,
I am early into the course and followed along the youtube series where we put in place the enhanced input for a pawn. Now In the follow up videos we actually want a character and not a pawn.

Everything worked just great with the pawn so as an idiot i tought i just had to mimic my pawn class and reimplement the wheel inside the character class. Apart from having two capsules since pawn doesn't have one by default, movement went smooth. But for some reason the camera wont move an inch what so ever.

I followed along the blueprint config of that video even if that still on the old input system.

So question is what is the difference between a pawn and a character so my camera can be moved?

For reference :

ATia::ATia()
{
    PrimaryActorTick.bCanEverTick = true;
    
    bUseControllerRotationPitch = false;
    bUseControllerRotationYaw = false;
    bUseControllerRotationRoll = false;
    
    SpringArm = CreateDefaultSubobject<USpringArmComponent>(TEXT("SpringArm"));
    SpringArm->SetupAttachment(GetRootComponent());
    SpringArm->TargetArmLength = 300.f;
    SpringArm->bEnableCameraLag = true;
    SpringArm->CameraLagSpeed = 3.f;
    SpringArm->AddRelativeRotation(FRotator(-20.f, 0.f, 0.f));

    Camera = CreateDefaultSubobject<UCameraComponent>(TEXT("Camera"));
    Camera->SetupAttachment(SpringArm);
    Camera->bUsePawnControlRotation = false;
}

void ATia::Look(const FInputActionValue& Value)
{
    const FVector2d look_axis_value = Value.Get<FVector2d>();
    UE_LOG(LogTemp, Warning, TEXT("Hello World")); // Never triggered

    if (GetController())
    {
        AddControllerYawInput(look_axis_value.X);
        AddControllerPitchInput(look_axis_value.Y);
    }
}
high flicker
orchid anvil
#

i partially did

#

i spent hours debugging that shit

#

and still have 0 clue. Because if i inverse the condition the jump animation play and on space (jump key) the jog play

#

but as soon as i switch back to normal i can jump but no anim

#

and yes i do have character movement

high flicker
#

Did you compare your code to his Github Commit? In the Lesson Resources