6#include "Chaos/ChaosConstraintSettings.h"
10 : Super(ObjectInitializer),
11 bLerpHybridWithSweepGrips(false),
12 bOnlyLerpHybridRotation(false),
13 HybridWithSweepLerpDuration(0.2f),
14 bUseGlobalLerpToHand(false),
15 bSkipLerpToHandIfHeld(false),
16 MinDistanceForLerp(10.0f),
18 MinSpeedForLerp(100.f),
19 MaxSpeedForLerp(500.f),
23 OneEuroMinCutoff(0.1f),
24 OneEuroCutoffSlope(10.0f),
25 OneEuroDeltaCutoff(10.0f),
26 CurrentControllerProfileInUse(NAME_None),
27 CurrentControllerProfileTransform(FTransform::Identity),
28 bUseSeperateHandTransforms(false),
29 CurrentControllerProfileTransformRight(FTransform::Identity)
54 return UGrippableSkeletalMeshComponent::StaticClass();
68 if (OptionalControllerProfileName == NAME_None)
77 return SocketTransform;
92 return SocketTransform;
99 return SocketTransform * (((bIsRightHand && ControllerProfile.bUseSeperateHandOffsetTransforms) ? ControllerProfile.SocketOffsetTransformRightHand : ControllerProfile.SocketOffsetTransform));
102 return SocketTransform;
118 if (VRSettings.
ControllerProfiles[i].ControllerName == OverwritingProfile.ControllerName)
124 if (bSaveOutToConfig)
134 if (bSaveOutToConfig)
150 if (bSaveOutToConfig)
157 VRSettings.SaveConfig();
181 bHadLoadedProfile = FoundProfile !=
nullptr;
183 if (bHadLoadedProfile)
185 return *FoundProfile;
202 OutProfile = *FoundProfile;
224 UE_LOG(LogTemp,
Warning, TEXT(
"Could not find controller profile!: %s"), *ControllerProfileName.ToString());
308 if (bSetAsCurrentProfile)
342 Super::PostInitProperties();
367 VRSettings.SaveConfig();
EVRLerpInterpolationMode
UENUM(BlueprintType)
UCLASS(config = Engine, defaultconfig)
static bool LoadControllerProfileByName(FName ControllerProfileName, bool bSetAsCurrentProfile=true)
UFUNCTION(BlueprintCallable, Category = "VRControllerProfiles")
bool bUseSeperateHandTransforms
float LinearDriveDampingScale
UPROPERTY(config, BlueprintReadWrite, EditAnywhere, Category = "ChaosPhysics")
static void SaveControllerProfiles()
UFUNCTION(BlueprintCallable, Category = "VRControllerProfiles|Operations")
float AngularDriveDampingScale
UPROPERTY(config, BlueprintReadWrite, EditAnywhere, Category = "ChaosPhysics")
TArray< FBPHitSurfaceProperties > MeleeSurfaceSettings
UPROPERTY(config, EditAnywhere, Category = "MeleeSettings")
UVRGlobalSettings(const FObjectInitializer &ObjectInitializer)
FVRControllerProfileChangedEvent OnControllerProfileChangedEvent
static TSubclassOf< class UGrippableSkeletalMeshComponent > GetDefaultGrippableCharacterMeshComponentClass()
FBPVirtualStockSettings VirtualStockSettings
UPROPERTY(config, EditAnywhere, Category = "GunSettings")
static FTransform AdjustTransformByControllerProfile(FName OptionalControllerProfileName, const FTransform &SocketTransform, bool bIsRightHand=false)
UFUNCTION(BlueprintPure, Category = "VRControllerProfiles")
static FBPVRControllerProfile GetCurrentProfile(bool &bHadLoadedProfile)
UFUNCTION(BlueprintCallable, Category = "VRControllerProfiles")
static bool GetControllerProfile(FName ControllerProfileName, FBPVRControllerProfile &OutProfile)
UFUNCTION(BlueprintCallable, Category = "VRControllerProfiles")
TArray< FBPVRControllerProfile > ControllerProfiles
UPROPERTY(config, EditAnywhere, Category = "ControllerProfiles")
static void SaveVirtualStockGlobalSettings(FBPVirtualStockSettings NewVirtualStockSettings)
UFUNCTION(BlueprintCallable, Category = "GunSettings|VirtualStock")
static FTransform AdjustTransformByGivenControllerProfile(UPARAM(ref) FBPVRControllerProfile &ControllerProfile, const FTransform &SocketTransform, bool bIsRightHand=false)
UFUNCTION(BlueprintPure, Category = "VRControllerProfiles")
static void GetMeleeSurfaceGlobalSettings(TArray< FBPHitSurfaceProperties > &OutMeleeSurfaceSettings)
UFUNCTION(BlueprintCallable, Category = "MeleeSettings")
FName CurrentControllerProfileInUse
static void GetVirtualStockGlobalSettings(FBPVirtualStockSettings &OutVirtualStockSettings)
UFUNCTION(BlueprintCallable, Category = "GunSettings|VirtualStock")
FTransform CurrentControllerProfileTransform
float AngularDriveStiffnessScale
UPROPERTY(config, BlueprintReadWrite, EditAnywhere, Category = "ChaosPhysics")
bool bUseGlobalLerpToHand
UPROPERTY(config, BlueprintReadWrite, EditAnywhere, Category = "GlobalLerpToHand")
static bool IsGlobalLerpEnabled()
UFUNCTION(BlueprintPure, Category = "GlobalLerpToHand")
static void DeleteControllerProfile(FName ControllerProfileName, bool bSaveOutToConfig=true)
UFUNCTION(BlueprintCallable, Category = "VRControllerProfiles|Operations")
TSubclassOf< class UGrippableSkeletalMeshComponent > DefaultGrippableCharacterMeshComponentClass
UPROPERTY(config, BlueprintReadWrite, EditAnywhere, Category = "Misc")
static bool LoadControllerProfile(const FBPVRControllerProfile &ControllerProfile, bool bSetAsCurrentProfile=true)
UFUNCTION(BlueprintCallable, Category = "VRControllerProfiles")
static void AddControllerProfile(UPARAM(ref) FBPVRControllerProfile &NewProfile, bool bSaveOutToConfig=true)
UFUNCTION(BlueprintCallable, Category = "VRControllerProfiles|Operations")
float LinearDriveStiffnessScale
UPROPERTY(config, BlueprintReadWrite, EditAnywhere, Category = "ChaosPhysics")
static TArray< FBPVRControllerProfile > GetControllerProfiles()
UFUNCTION(BlueprintCallable, Category = "VRControllerProfiles")
virtual void PostInitProperties() override
static FName GetCurrentProfileName(bool &bHadLoadedProfile)
UFUNCTION(BlueprintCallable, Category = "VRControllerProfiles")
static void OverwriteControllerProfile(UPARAM(ref) FBPVRControllerProfile &OverwritingProfile, bool bSaveOutToConfig=true)
UFUNCTION(BlueprintCallable, Category = "VRControllerProfiles|Operations")
FTransform CurrentControllerProfileTransformRight
USTRUCT(BlueprintType, Category = "ControllerProfiles")
FTransform_NetQuantize SocketOffsetTransformRightHand
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "ControllerProfiles", meta = (editcondition = ...
FName ControllerName
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "ControllerProfiles")
FTransform_NetQuantize SocketOffsetTransform
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "ControllerProfiles")
bool bUseSeperateHandOffsetTransforms
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "ControllerProfiles")
USTRUCT(BlueprintType, Category = "GunSettings")
bool bSmoothStockHand
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "VirtualStock|Smoothing")
FVector_NetQuantize100 StockSnapOffset
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "VirtualStock")
float StockSnapDistance
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "VirtualStock")
bool bUseDistanceBasedStockSnapping
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "VirtualStock")
float SmoothingValueForStock
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "VirtualStock|Smoothing", meta = (editconditio...