Implemented bullet impact sounds

This commit is contained in:
TjgL 2025-04-16 23:31:30 +02:00
parent 24822d8527
commit fa313d3563
2 changed files with 5 additions and 3 deletions

BIN
Content/Legumix/Player/BP_Play.uasset (Stored with Git LFS)

Binary file not shown.

View File

@ -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)