53 lines
2.5 KiB
C++
53 lines
2.5 KiB
C++
// Copyright 2016 Mookie. All Rights Reserved.
|
|
|
|
|
|
#pragma once
|
|
|
|
#include "CoreMinimal.h"
|
|
#include "Engine/DataAsset.h"
|
|
#include "PhysicalMaterials/PhysicalMaterial.h"
|
|
#include "EBBulletProperties.h"
|
|
#include "EBMaterialResponseMap.generated.h"
|
|
|
|
UENUM(BlueprintType)
|
|
enum class EPenTraceType : uint8
|
|
{
|
|
PT_BackTrace UMETA(DisplayName = "Back Trace"),
|
|
PT_ByComponent UMETA(DisplayName = "By Component"),
|
|
PT_TwoSidedGeometry UMETA(DisplayName = "Double Sided Geometry"),
|
|
};
|
|
|
|
USTRUCT(BlueprintType)
|
|
struct FEBMaterialResponseMapEntry {
|
|
GENERATED_USTRUCT_BODY()
|
|
|
|
// Artistic Properties
|
|
UPROPERTY(EditAnywhere, Category = "Artistic Properties") EPenTraceType PenTraceType = EPenTraceType::PT_BackTrace;
|
|
UPROPERTY(EditAnywhere, Category = "Artistic Properties") bool NeverPenetrate = false;
|
|
UPROPERTY(EditAnywhere, Category = "Artistic Properties") float PenetrationDepthMultiplier = 1.0f;
|
|
UPROPERTY(EditAnywhere, Category = "Artistic Properties") float PenetrationNormalization = 0.0f;
|
|
UPROPERTY(EditAnywhere, Category = "Artistic Properties") float PenetrationNormalizationGrazing = 0.0f;
|
|
UPROPERTY(EditAnywhere, Category = "Artistic Properties") float PenetrationEntryAngleSpread = 0.0f;
|
|
UPROPERTY(EditAnywhere, Category = "Artistic Properties") float PenetrationExitAngleSpread = 0.0;
|
|
UPROPERTY(EditAnywhere, Category = "Artistic Properties") bool NeverRicochet = false;
|
|
UPROPERTY(EditAnywhere, Category = "Artistic Properties") float RicochetProbabilityMultiplier = 1.0f;
|
|
UPROPERTY(EditAnywhere, Category = "Artistic Properties") float RicochetRestitution = 0.5f;
|
|
UPROPERTY(EditAnywhere, Category = "Artistic Properties") float RicochetRestitutionInfluence = 0.0f;
|
|
UPROPERTY(EditAnywhere, Category = "Artistic Properties") float RicochetFriction = 0.5f;
|
|
UPROPERTY(EditAnywhere, Category = "Artistic Properties") float RicochetFrictionInfluence = 0.0f;
|
|
UPROPERTY(EditAnywhere, Category = "Artistic Properties") float RicochetSpread = 0.0f;
|
|
|
|
// Mathematical Properties
|
|
UPROPERTY(EditAnywhere, Category = "Mathematical Properties", meta = (ToolTip = "Use mathematical properties for this material"))
|
|
bool UseMathematicalProperties = false;
|
|
UPROPERTY(EditAnywhere, Category = "Mathematical Properties", meta = (EditCondition = "UseMathematicalProperties"))
|
|
FMathematicalMaterialProperties MathematicalProperties;
|
|
};
|
|
|
|
UCLASS(BlueprintType)
|
|
class UEBMaterialResponseMap : public UDataAsset{
|
|
GENERATED_BODY()
|
|
|
|
public:
|
|
UPROPERTY(EditAnywhere, Category = "Responses") TMap<UPhysicalMaterial*, FEBMaterialResponseMapEntry> Map;
|
|
}; |