85 lines
3.6 KiB
C
85 lines
3.6 KiB
C
// // Copyright 2025 https://yuewu.dev/en All Rights Reserved.
|
|
//
|
|
// #pragma once
|
|
//
|
|
// #include "CoreMinimal.h"
|
|
// #include "MovementModifier.h"
|
|
// #include "UObject/Object.h"
|
|
// #include "GMS_MovementStateModifer.generated.h"
|
|
//
|
|
//
|
|
// USTRUCT(BlueprintType)
|
|
// struct FGMS_MovementStateModifierEntry
|
|
// {
|
|
// GENERATED_BODY()
|
|
//
|
|
// /** Maximum speed in the movement plane */
|
|
// UPROPERTY(BlueprintReadWrite, EditAnywhere, Category="General", meta = (ClampMin = "0", UIMin = "0", ForceUnits = "cm/s"))
|
|
// float MaxSpeed = 800.f;
|
|
//
|
|
// /** Default max linear rate of deceleration when there is no controlled input */
|
|
// UPROPERTY(BlueprintReadWrite, EditAnywhere, Category="General", meta = (ClampMin = "0", UIMin = "0", ForceUnits = "cm/s^2"))
|
|
// float Deceleration = 4000.f;
|
|
//
|
|
// /** Default max linear rate of acceleration for controlled input. May be scaled based on magnitude of input. */
|
|
// UPROPERTY(BlueprintReadWrite, EditAnywhere, Category="General", meta = (ClampMin = "0", UIMin = "0", ForceUnits = "cm/s^2"))
|
|
// float Acceleration = 4000.f;
|
|
//
|
|
// /** Maximum rate of turning rotation (degrees per second). Negative numbers indicate instant rotation and should cause rotation to snap instantly to desired direction. */
|
|
// UPROPERTY(BlueprintReadWrite, EditAnywhere, Category="General", meta = (ClampMin = "-1", UIMin = "0", ForceUnits = "degrees/s"))
|
|
// float TurningRate = 500.f;
|
|
//
|
|
// /** Speeds velocity direction changes while turning, to reduce sliding */
|
|
// UPROPERTY(BlueprintReadWrite, EditAnywhere, Category="General", meta = (ClampMin = "0", UIMin = "0", ForceUnits = "Multiplier"))
|
|
// float TurningBoost = 8.f;
|
|
// };
|
|
//
|
|
//
|
|
// /**
|
|
// * States: Applies settings to the actor to make them go into different states like walk or jog, sprint, affects actor speed and acceleration/deceleration, turn etc,
|
|
// */
|
|
// USTRUCT(BlueprintType)
|
|
// struct MOVER_API FGMS_MovementStateModifier : public FMovementModifierBase
|
|
// {
|
|
// GENERATED_BODY()
|
|
//
|
|
// FGMS_MovementStateModifier();
|
|
//
|
|
// virtual ~FGMS_MovementStateModifier() override
|
|
// {
|
|
// }
|
|
//
|
|
// UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="Modifer")
|
|
// bool bRevertMovementSettingsOnEnd{false};
|
|
//
|
|
// /** Fired when this modifier is activated. */
|
|
// virtual void OnStart(UMoverComponent* MoverComp, const FMoverTimeStep& TimeStep, const FMoverSyncState& SyncState, const FMoverAuxStateContext& AuxState) override;
|
|
//
|
|
// /** Fired when this modifier is deactivated. */
|
|
// virtual void OnEnd(UMoverComponent* MoverComp, const FMoverTimeStep& TimeStep, const FMoverSyncState& SyncState, const FMoverAuxStateContext& AuxState) override;
|
|
//
|
|
// /** Fired just before a Substep */
|
|
// virtual void OnPreMovement(UMoverComponent* MoverComp, const FMoverTimeStep& TimeStep) override;
|
|
//
|
|
// /** Fired after a Substep */
|
|
// virtual void OnPostMovement(UMoverComponent* MoverComp, const FMoverTimeStep& TimeStep, const FMoverSyncState& SyncState, const FMoverAuxStateContext& AuxState) override;
|
|
//
|
|
// // @return newly allocated copy of this FMovementModifier. Must be overridden by child classes
|
|
// virtual FMovementModifierBase* Clone() const override;
|
|
//
|
|
// virtual void NetSerialize(FArchive& Ar) override;
|
|
//
|
|
// virtual UScriptStruct* GetScriptStruct() const override;
|
|
//
|
|
// virtual FString ToSimpleString() const override;
|
|
//
|
|
// virtual void AddReferencedObjects(class FReferenceCollector& Collector) override;
|
|
//
|
|
// protected:
|
|
// // Applies any movement settings like acceleration or max speed changes
|
|
// void ApplyMovementSettings(UMoverComponent* MoverComp);
|
|
//
|
|
// // Reverts any movement settings like acceleration or max speed changes
|
|
// void RevertMovementSettings(UMoverComponent* MoverComp);
|
|
// };
|