From fa313d3563c8a1f338a67b28123aad706b3d8302 Mon Sep 17 00:00:00 2001 From: TjgL Date: Wed, 16 Apr 2025 23:31:30 +0200 Subject: [PATCH] Implemented bullet impact sounds --- Content/Legumix/Player/BP_Play.uasset | 4 ++-- Source/LegumeMix/Private/Player/LMPlayer.cpp | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/Content/Legumix/Player/BP_Play.uasset b/Content/Legumix/Player/BP_Play.uasset index 28b5e0a..e2c603a 100644 --- a/Content/Legumix/Player/BP_Play.uasset +++ b/Content/Legumix/Player/BP_Play.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:ca047a643981cb89c7e2cd8e9d5dc6d4c9ad2cf05eedc48712d8591123383186 -size 908879 +oid sha256:e5c422bf6ba1bc88535fa1d525ee7803921caa85b1a3dc33e41719507e8d30f8 +size 940995 diff --git a/Source/LegumeMix/Private/Player/LMPlayer.cpp b/Source/LegumeMix/Private/Player/LMPlayer.cpp index 01c79ca..f467716 100644 --- a/Source/LegumeMix/Private/Player/LMPlayer.cpp +++ b/Source/LegumeMix/Private/Player/LMPlayer.cpp @@ -171,7 +171,9 @@ void ALMPlayer::FireBullets(const FLMBulletInfo Settings) ShotVector = UKismetMathLibrary::RandomUnitVectorInConeInDegreesFromStream(SpreadStream, Settings.Direction, Settings.Spread); EndLocation = Settings.Origin + (ShotVector * Settings.MaxDistance); - const bool HasHit = GetWorld()->LineTraceSingleByChannel(OutHit, Settings.Origin, EndLocation, TRACE_BULLET); + FCollisionQueryParams Params; + Params.bReturnPhysicalMaterial = true; + const bool HasHit = GetWorld()->LineTraceSingleByChannel(OutHit, Settings.Origin, EndLocation, TRACE_BULLET, Params); #if WITH_EDITOR if (bDrawBulletDebug)