Download

Unable to get spectator pawn to move

This has me stumped. I have a rather generic spectator pawn I’m trying to get to work. It spawns and the controller is able to tilt the camera and look around. But for reasons unknown, the pawn is refusing to respond to movement commands. Here’s what I know:

  • AddMovementInput(Direction, Val, false) is being called to initiate movement. It has valid values.

  • The spectator pawn is bound and possessed by the controller.

  • Inputs are enabled.

  • bIsSpectator is true.

  • the state is being set to NAME_Spectating.

  • Ticks are enabled and are active.

I traced the AddMovement call using the debugger and it seems that it is doing it’s thing (though much of the code was in assembly language since the pdb to the engine is missing). I didn’t see any early exits checking the asm code against the source. It seems like the engine is simply not bothering to do any movement updates based on the supplied inputs. I suspect there’s a flag somewhere that didn’t get set. But it remains elusive. Any ideas?

Solved — BeginPlay() wasn’t calling it’s parent class “Super::BeginPlay()”. This is needed because the parent registers the component and places it in the Tick List.