Bugfix Cursor Not Hiding After Combat
This commit is contained in:
parent
7e81387247
commit
d18c547632
BIN
Content/Levels/Top_layer_level.umap
(Stored with Git LFS)
BIN
Content/Levels/Top_layer_level.umap
(Stored with Git LFS)
Binary file not shown.
@ -85,7 +85,7 @@ AActor* UHoldToInitCombat::LookingAtEnemy() const
|
||||
CollisionParams.AddIgnoredActor(GetOwner());
|
||||
if (FHitResult HitResult; GetWorld()->LineTraceSingleByChannel(HitResult, Start, End, ECC_Pawn, CollisionParams))
|
||||
{
|
||||
DrawDebugLine(GetWorld(), Start, End, FColor::Green, false, 5.0f, 0, 10.0f);
|
||||
//DrawDebugLine(GetWorld(), Start, End, FColor::Green, false, 5.0f, 0, 10.0f);
|
||||
if (HitResult.GetActor()->Tags.Contains("Enemy"))
|
||||
{
|
||||
return HitResult.GetActor();
|
||||
@ -96,6 +96,6 @@ AActor* UHoldToInitCombat::LookingAtEnemy() const
|
||||
return nullptr;
|
||||
}
|
||||
}
|
||||
DrawDebugLine(GetWorld(), Start, End, FColor::Red, false, 5.0f, 0, 10.0f);
|
||||
//DrawDebugLine(GetWorld(), Start, End, FColor::Red, false, 5.0f, 0, 10.0f);
|
||||
return nullptr;
|
||||
}
|
||||
|
@ -68,6 +68,17 @@ void ATurnBaseCombatV2::EndCombat()
|
||||
{
|
||||
PlayerCharacter->EnableInput(GetWorld()->GetFirstPlayerController());
|
||||
}
|
||||
if (APlayerController* PC = Cast<APlayerController>(GetWorld()->GetFirstPlayerController()))
|
||||
{
|
||||
PC->bShowMouseCursor = false;
|
||||
PC->bEnableClickEvents = false;
|
||||
PC->bEnableMouseOverEvents = false;
|
||||
}
|
||||
GetWorld()->GetFirstPlayerController()->SetIgnoreLookInput(false);
|
||||
GetWorld()->GetFirstPlayerController()->SetIgnoreMoveInput(false);
|
||||
GetWorld()->GetFirstPlayerController()->bShowMouseCursor = false;
|
||||
GetWorld()->GetFirstPlayerController()->bEnableClickEvents = false;
|
||||
GetWorld()->GetFirstPlayerController()->bEnableMouseOverEvents = false;
|
||||
}
|
||||
|
||||
void ATurnBaseCombatV2::FKeyPressed()
|
||||
|
Loading…
Reference in New Issue
Block a user