ExoWest/Source/Exo/Public/Player/InteractionComponent.h
Kubson96 e70f96df2c fix: fixed linetrace after locking character pitch
Fixed linetrace, because it was follow only horizontal axis after locking character pitch.
Added empty GunBase class with BP revolver item.
2025-03-15 13:48:39 +01:00

38 lines
915 B
C++

#pragma once
#include "CoreMinimal.h"
#include "Components/ActorComponent.h"
#include "Interfaces/Interactable.h"
#include "InteractionComponent.generated.h"
UCLASS( ClassGroup=(Custom), meta=(BlueprintSpawnableComponent) )
class EXO_API UInteractionComponent : public UActorComponent
{
GENERATED_BODY()
public:
// Sets default values for this component's properties
UInteractionComponent();
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="Settings")
float InteractionDistance = 135.0f;
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="Debug")
bool bShowDebugLine = false;
AActor *InteractedActor = nullptr;
protected:
// Called when the game starts
virtual void BeginPlay() override;
public:
// Called every frame
virtual void TickComponent(float DeltaTime, ELevelTick TickType, FActorComponentTickFunction* ThisTickFunction) override;
private:
void CheckForInteractable();
};