InputComponent->BindAction crashes

void ATopDownController::SetupInputComponent()

{

Super::SetupInputComponent();

InputComponent->BindAxis("MoveForward", this, &ATopDownController::MoveForward);

InputComponent->BindAxis("MoveRight", this, &ATopDownController::MoveRight);

InputComponent->BindAction("SprintTrigger", IE_Pressed, this, &ATopDownController::SprintTriggerOn);

//InputComponent->BindAction("SprintTrigger", IE_Released, this, &ATopDownController::SprintTriggerRelease);

InputComponent->BindAction("TargetTrigger", IE_Pressed, this, &ATopDownController::TargetTriggerOn);

}

the function I commented out is empty but it crashes. why? It works fine when I commented it out though.

void ATopDownController::SprintTriggerOn()

{

isSprintTriggerOn = true;

}

void ATopDownController::SprintTriggerRelease()

{

//isSprintTriggerOn = false;

}

//.h

void SprintTriggerOn();
void SprintTriggerRelease();

Including the crash report would be helpful.

Privacy & Terms