by default the event tick does not fire in C++ Top Down mode in the top down character blueprints. They did work in Blueprint Top Down and C++ Third Person that I checked.
After commenting out the virtual void Tick(float DeltaSeconds) override;
and its associated function in _Character.cpp the character blueprint Event Tick began working.
void AEternalThreadCharacter::Tick(float DeltaSeconds)
{
if (CursorToWorld != nullptr)
{
if (UHeadMountedDisplayFunctionLibrary::IsHeadMountedDisplayEnabled())
{
if (UWorld* World = GetWorld())
{
FHitResult HitResult;
FCollisionQueryParams Params;
FVector StartLocation = TopDownCameraComponent->GetComponentLocation();
FVector EndLocation = TopDownCameraComponent->GetComponentRotation().Vector() * 2000.0f;
Params.AddIgnoredActor(this);
World->LineTraceSingleByChannel(HitResult, StartLocation, EndLocation, ECC_Visibility, Params);
FQuat SurfaceRotation = HitResult.ImpactNormal.ToOrientationRotator().Quaternion();
CursorToWorld->SetWorldLocationAndRotation(HitResult.Location, SurfaceRotation);
}
}
else if (APlayerController* PC = Cast<APlayerController>(GetController()))
{
FHitResult TraceHitResult;
PC->GetHitResultUnderCursor(ECC_Visibility, true, TraceHitResult);
FVector CursorFV = TraceHitResult.ImpactNormal;
FRotator CursorR = CursorFV.Rotation();
CursorToWorld->SetWorldLocation(TraceHitResult.Location);
CursorToWorld->SetWorldRotation(CursorR);
}
}
}
I’d like to actually fix the problem, not just cover it up, does anyone have any ideas why this code would be preventing the blueprint Event Tick from functioning?