5#include "CoreMinimal.h"
6#include "Components/ActorComponent.h"
7#include "AudioReactionComponent.generated.h"
10UCLASS(Blueprintable, BlueprintType, ClassGroup=(BucciGames), meta=(BlueprintSpawnableComponent))
11class INTERACTION_API UAudioReactionComponent :
public UActorComponent
16 UAudioReactionComponent();
17 UFUNCTION(BlueprintCallable, Category="Audio")
18 void SetSkeletalMeshComponent(USkeletalMeshComponent* Mesh);
20 virtual
void SetActive(
bool bNewActive,
bool bReset = false) override;
23 virtual
void BeginPlay() override;
25 UFUNCTION(BlueprintCallable, Category="Audio")
26 void OnHit(AActor* SelfActor, AActor* OtherActor, FVector NormalImpulse, const FHitResult&
Hit);
28 UFUNCTION(BlueprintCallable, Category="Audio")
29 void PlayHitSound(const
float Volume, const FVector& HitLocation);
31 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="Audio")
32 TSoftObjectPtr<USoundBase> ImpactSound;
34 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="Audio")
35 float PitchMultiplier = 1.0f;
36 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="Audio")
37 float VolumeMultiplier = 1.0f;
38 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="Audio")
39 bool bDebuggingMode = false;
41 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="Audio")
42 float VelocityThreshold = 250.0f;
43 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="Audio")
44 float OtherActorVelocityThreshold = 500.0f;
46 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="Audio")
47 float MaxVolumeVelocity = 5000.0f;
49 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="Audio")
50 float AudioPlayDelay = 0.2f;
51 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="Audio")
52 float MaxAudioVolume = 1.2f;
53 UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category="Audio")
54 class UAudioComponent* ImpactAudioComponent =
nullptr;
55 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="Audio")
56 bool bAddDurationToDelay = false;
59 UPROPERTY(VisibleAnywhere, Category="Audio")
60 bool bIsCharacter = false;
61 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="Audio")
62 bool bUseOneBodyPart = false;
63 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="Audio")
64 FName MainBodyPartName = FName("
Pelvis");
65 UFUNCTION(BlueprintCallable, Category="Audio")
66 float GetMainBodyPartVelocity(const USkeletalMeshComponent* SkeletalMesh, const FName BoneName) const;
67 UFUNCTION(BlueprintCallable, Category="Audio")
68 float CalculateRagdollVelocity(USkeletalMeshComponent* SkeletalMesh) const;
73 UPROPERTY(VisibleAnywhere, Category="Audio")
74 bool bIsHitPlaying = false;
76 UPROPERTY(VisibleAnywhere, Category="Audio")
77 class USkeletalMeshComponent* SkeletalMeshComponent =
nullptr;
79 FTimerHandle HitPlayingTimerHandle;
UCLASS(Blueprintable, BlueprintType, ClassGroup=(BucciGames), meta=(BlueprintSpawnableComponent)) class CHATSYSTEM_API UChatSystemComponent
Definition ChatSystemComponent.h:13