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());
|
CollisionParams.AddIgnoredActor(GetOwner());
|
||||||
if (FHitResult HitResult; GetWorld()->LineTraceSingleByChannel(HitResult, Start, End, ECC_Pawn, CollisionParams))
|
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"))
|
if (HitResult.GetActor()->Tags.Contains("Enemy"))
|
||||||
{
|
{
|
||||||
return HitResult.GetActor();
|
return HitResult.GetActor();
|
||||||
@ -96,6 +96,6 @@ AActor* UHoldToInitCombat::LookingAtEnemy() const
|
|||||||
return nullptr;
|
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;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
@ -68,6 +68,17 @@ void ATurnBaseCombatV2::EndCombat()
|
|||||||
{
|
{
|
||||||
PlayerCharacter->EnableInput(GetWorld()->GetFirstPlayerController());
|
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()
|
void ATurnBaseCombatV2::FKeyPressed()
|
||||||
|
Loading…
Reference in New Issue
Block a user