From de296a10b9ca7f8318c0d4dedf4113511cf678cd Mon Sep 17 00:00:00 2001 From: PHILIP WHITE Date: Sat, 11 May 2024 16:50:57 +0100 Subject: [PATCH] Bugfix Bullet Impact Not Overlapping Restricted Bounds --- EndlessVendetta/Config/DefaultEngine.ini | 1 + .../Pistols/Pistol_Assets/BP_HandGun_Projectile.uasset | 4 ++-- .../Source/EndlessVendetta/AI/AI_RestrictedZone.cpp | 7 +++++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/EndlessVendetta/Config/DefaultEngine.ini b/EndlessVendetta/Config/DefaultEngine.ini index eca8171f..d94d269c 100644 --- a/EndlessVendetta/Config/DefaultEngine.ini +++ b/EndlessVendetta/Config/DefaultEngine.ini @@ -41,6 +41,7 @@ +DefaultChannelResponses=(Channel=ECC_GameTraceChannel2,DefaultResponse=ECR_Block,bTraceType=False,bStaticObject=False,Name="Waypoint") +DefaultChannelResponses=(Channel=ECC_GameTraceChannel3,DefaultResponse=ECR_Ignore,bTraceType=False,bStaticObject=False,Name="Player") +DefaultChannelResponses=(Channel=ECC_GameTraceChannel4,DefaultResponse=ECR_Block,bTraceType=False,bStaticObject=False,Name="Enemy") ++DefaultChannelResponses=(Channel=ECC_GameTraceChannel5,DefaultResponse=ECR_Overlap,bTraceType=False,bStaticObject=False,Name="RestrictedBounds") +EditProfiles=(Name="Trigger",CustomResponses=((Channel="Projectile",Response=ECR_Ignore))) -ProfileRedirects=(OldName="BlockingVolume",NewName="InvisibleWall") -ProfileRedirects=(OldName="InterpActor",NewName="IgnoreOnlyPawn") diff --git a/EndlessVendetta/Content/FirstPerson/Blueprints/BaseWeapons/Pistols/Pistol_Assets/BP_HandGun_Projectile.uasset b/EndlessVendetta/Content/FirstPerson/Blueprints/BaseWeapons/Pistols/Pistol_Assets/BP_HandGun_Projectile.uasset index 43e62eed..919b4e97 100644 --- a/EndlessVendetta/Content/FirstPerson/Blueprints/BaseWeapons/Pistols/Pistol_Assets/BP_HandGun_Projectile.uasset +++ b/EndlessVendetta/Content/FirstPerson/Blueprints/BaseWeapons/Pistols/Pistol_Assets/BP_HandGun_Projectile.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:6b599f7add7a160c01e7800a4c556bbdc21ed3025443f8c01376b07b57e5c8da -size 95047 +oid sha256:510212c22d9ee9fa8995889d9e25f1d265e7824cfe5779c69ade26f6c94d8251 +size 95202 diff --git a/EndlessVendetta/Source/EndlessVendetta/AI/AI_RestrictedZone.cpp b/EndlessVendetta/Source/EndlessVendetta/AI/AI_RestrictedZone.cpp index de23fdad..5158b758 100644 --- a/EndlessVendetta/Source/EndlessVendetta/AI/AI_RestrictedZone.cpp +++ b/EndlessVendetta/Source/EndlessVendetta/AI/AI_RestrictedZone.cpp @@ -12,6 +12,7 @@ AAI_RestrictedZone::AAI_RestrictedZone() // Set this actor to call Tick() every frame. You can turn this off to improve performance if you don't need it. PrimaryActorTick.bCanEverTick = true; BoxCollision = CreateDefaultSubobject(TEXT("BoxCollision")); + BoxCollision->SetCollisionObjectType(ECC_GameTraceChannel5); BoxCollision->SetCollisionResponseToChannel(ECC_EngineTraceChannel4, ECR_Overlap); } @@ -23,7 +24,8 @@ void AAI_RestrictedZone::BeginPlay() BoxCollision->OnComponentEndOverlap.AddDynamic(this, &AAI_RestrictedZone::OnBoxOverlapEnd); } -void AAI_RestrictedZone::OnBoxOverlapBegin(UPrimitiveComponent* OverlappedComp, AActor* OtherActor, UPrimitiveComponent* OtherComp, int32 OtherBodyIndex, bool bFromSweep, const FHitResult& SweepResult) +void AAI_RestrictedZone::OnBoxOverlapBegin(UPrimitiveComponent* OverlappedComp, AActor* OtherActor, UPrimitiveComponent* OtherComp, + int32 OtherBodyIndex, bool bFromSweep, const FHitResult& SweepResult) { if (Cast(OtherActor)) { @@ -32,7 +34,8 @@ void AAI_RestrictedZone::OnBoxOverlapBegin(UPrimitiveComponent* OverlappedComp, } } -void AAI_RestrictedZone::OnBoxOverlapEnd(UPrimitiveComponent* OverlappedComp, AActor* OtherActor, UPrimitiveComponent* OtherComp, int32 OtherBodyIndex) +void AAI_RestrictedZone::OnBoxOverlapEnd(UPrimitiveComponent* OverlappedComp, AActor* OtherActor, UPrimitiveComponent* OtherComp, + int32 OtherBodyIndex) { if (Cast(OtherActor)) {