5#include "CoreMinimal.h"
7#include "Components/ActorComponent.h"
9#include "GravityComponent.generated.h"
12class UCapsuleComponent;
13class USphereComponent;
17UCLASS(Blueprintable, BlueprintType, ClassGroup=(BucciGames), meta=(BlueprintSpawnableComponent))
18class SPACEADVENTURE_API UGravityComponent :
public UActorComponent
25 UFUNCTION(BlueprintCallable, Category="Gravity")
26 virtual
void AddShapeComponent(UShapeComponent* Component);
28 UFUNCTION(BlueprintCallable, Category="Gravity")
29 virtual
void SetShapeComponents(TArray<UShapeComponent*> Components);
32 UFUNCTION(BlueprintCallable, Category="Gravity")
33 virtual
void SetSplineComponent(class USplineComponent* Component);
35 UFUNCTION(BlueprintCallable, Category="Gravity")
36 virtual
void SetGravityActor(class AActor* Actor);
38 virtual
void TickComponent(
float DeltaTime, ELevelTick TickType, FActorComponentTickFunction* ThisTickFunction) override;
42 UFUNCTION(BlueprintCallable, Category="Gravity")
43 void CheckForOverlappingActors();
46 virtual
void BeginPlay() override;
52 virtual
void ActorEnteredVolume(AActor*
Other);
53 UFUNCTION(BlueprintImplementableEvent, Category="Gravity")
54 void OnActorEnteredVolume(AActor*
Other);
59 virtual
void ActorLeavingVolume(AActor*
Other);
60 UFUNCTION(BlueprintImplementableEvent, Category="Gravity")
61 void OnActorLeavingVolume(AActor*
Other);
64 void CheckShapeForOverlappingActors(const UShapeComponent* Component);
66 void CheckBoxForOverlappingActors(const UBoxComponent* Component);
68 void CheckSphereForOverlappingActors(const USphereComponent* Component);
70 void CheckCapsuleForOverlappingActors(const UCapsuleComponent* Component);
73 void OnBoxComponentBeginOverlap(UPrimitiveComponent* SelfComponent, AActor* OtherActor, UPrimitiveComponent* OtherComponent, int32 BodyIndex,
bool bFromSweep, const FHitResult& HitResult);
75 void OnBoxComponentEndOverlap(UPrimitiveComponent* SelfComponent, AActor* OtherActor, UPrimitiveComponent* OtherComponent, int32 BodyIndex);
78 float GetGravityZ() const;
83 UFUNCTION(BlueprintPure,Category="Gravity")
84 virtual
float GetFinalGravityScale(class USceneComponent* SceneComponent) const;
88 UFUNCTION(BlueprintSetter,Category="Gravity")
89 virtual
void SetGravityScale(const
float NewGravityScale);
94 UFUNCTION(BlueprintPure,Category="Gravity")
95 virtual FVector GetGravity(class USceneComponent* SceneComponent) const;
96 UFUNCTION(BlueprintPure,Category="Gravity")
97 virtual
bool GetShouldTickBeEnabled() const;
101 UFUNCTION(BlueprintPure,Category="Gravity")
102 virtual
float GetGravityScale() const;
104 UFUNCTION(BlueprintCallable, Category="Gravity")
105 class USplineComponent* GetSplineComponent() const;
111 UPROPERTY(EditAnywhere, BlueprintReadOnly, Category="Gravity|Debugging")
112 bool bDebuggingMode = false;
114 UPROPERTY(EditAnywhere, BlueprintReadOnly, Category="Gravity|Debugging")
115 bool bRagdollOnTick = false;
116 UPROPERTY(EditAnywhere, BlueprintReadOnly, Category="Gravity|Debugging")
117 bool bAddForceAllBodies = false;
118 UPROPERTY(EditAnywhere, BlueprintReadOnly, Category="Gravity|Debugging")
119 float CharacterGravityMultiplier = 5.0f;
123 UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Transient, Category="Gravity|Components")
124 TArray<class UShapeComponent*> AllShapeComponents;
127 UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Transient, Category="Gravity")
140 UPROPERTY(EditAnywhere,BlueprintReadWrite,Category="Gravity")
141 FVector CharacterFallVelocity = FVector::ZeroVector;;
143 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="Gravity")
146 UPROPERTY(EditAnywhere, BlueprintReadOnly,Category="Gravity")
147 FVector GravityVectorA = FVector(0.0f, 0.0f, -1.0f);
149 UPROPERTY(EditAnywhere, BlueprintReadOnly,Category="Gravity")
150 FVector GravityVectorB = FVector::ZeroVector;
152 UPROPERTY(EditAnywhere, BlueprintReadOnly, Category="Gravity")
153 TObjectPtr<AActor> GravityActor =
nullptr;;
155 UPROPERTY(EditAnywhere,BlueprintReadWrite,BlueprintSetter=SetGravityScale,Category="Gravity")
156 float GravityScale = 1.0f;;
161 class USplineComponent* SplineComponent =
nullptr;
164 UPROPERTY(EditAnywhere, Category="Gravity")
165 float ActorCheckDelay = 0.1f;
167 FTimerHandle ActorCheckTimerHandle;
UCLASS(Blueprintable, BlueprintType, ClassGroup=(BucciGames), meta=(BlueprintSpawnableComponent)) class CHATSYSTEM_API UChatSystemComponent
Definition ChatSystemComponent.h:13
Definition GravityData.h:15