Navigation
API > API/Runtime > API/Runtime/PhysicsCore
Physical materials are used to define the response of a physical object when interacting dynamically with the world.
| Name | UPhysicalMaterial |
| Type | class |
| Header File | /Engine/Source/Runtime/PhysicsCore/Public/PhysicalMaterials/PhysicalMaterial.h |
| Include Path | #include "PhysicalMaterials/PhysicalMaterial.h" |
Syntax
UCLASS (BlueprintType, Blueprintable, CollapseCategories, HideCategories=Object, MinimalAPI)
class UPhysicalMaterial : public UObject
Inheritance Hierarchy
- UObjectBase → UObjectBaseUtility → UObject → UPhysicalMaterial
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
UPhysicalMaterial
(
const FObjectInitializer& ObjectInitializer |
PhysicalMaterials/PhysicalMaterial.h | ||
UPhysicalMaterial
(
FVTableHelper& Helper |
PhysicalMaterials/PhysicalMaterial.h |
Destructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual ~UPhysicalMaterial() |
PhysicalMaterials/PhysicalMaterial.h |
Variables
Public
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| BaseFrictionImpulse | float | A friction (positional) impulse of at least this magnitude may be applied, regardless the normal force. | PhysicalMaterials/PhysicalMaterial.h |
|
| bOverrideFrictionCombineMode | bool | If set we will use the FrictionCombineMode of this material, instead of the FrictionCombineMode found in the project settings. | PhysicalMaterials/PhysicalMaterial.h |
|
| bOverrideRestitutionCombineMode | bool | If set we will use the RestitutionCombineMode of this material, instead of the RestitutionCombineMode found in the project settings. | PhysicalMaterials/PhysicalMaterial.h |
|
| bShowExperimentalProperties | bool | Experimental properties Experimental material properties are enabled via the p.PhysicalMaterial.ShowExperimentalProperties console variable. | PhysicalMaterials/PhysicalMaterial.h |
|
| DamageModifier | FPhysicalMaterialDamageModifier | PhysicalMaterials/PhysicalMaterial.h |
|
|
| DebugColor | FLinearColor | Color used to represent this material in certain debug views (e.g. landscape collision) | PhysicalMaterials/PhysicalMaterial.h |
|
| Density | float | Object properties. | PhysicalMaterials/PhysicalMaterial.h |
|
| Friction | float | Surface properties. | PhysicalMaterials/PhysicalMaterial.h |
|
| FrictionCombineMode | TEnumAsByte< EFrictionCombineMode::Type > | Friction combine mode, controls how friction is computed for multiple materials. | PhysicalMaterials/PhysicalMaterial.h |
|
| MaterialHandle | TUniquePtr< FPhysicsMaterialHandle > | PhysicalMaterials/PhysicalMaterial.h | ||
| RaiseMassToPower | float | Used to adjust the way that mass increases as objects get larger. | PhysicalMaterials/PhysicalMaterial.h |
|
| Restitution | float | Restitution or 'bounciness' of this surface, between 0 (no bounce) and 1 (outgoing velocity is same as incoming). | PhysicalMaterials/PhysicalMaterial.h |
|
| RestitutionCombineMode | TEnumAsByte< EFrictionCombineMode::Type > | Restitution combine mode, controls how restitution is computed for multiple materials. | PhysicalMaterials/PhysicalMaterial.h |
|
| SleepAngularVelocityThreshold | float | How low the angular velocity can be before solver puts body to sleep. | PhysicalMaterials/PhysicalMaterial.h |
|
| SleepCounterThreshold | int32 | How many ticks we can be under thresholds for before solver puts body to sleep. | PhysicalMaterials/PhysicalMaterial.h |
|
| SleepLinearVelocityThreshold | float | How low the linear velocity can be before solver puts body to sleep. | PhysicalMaterials/PhysicalMaterial.h |
|
| SoftCollisionMode | EPhysicalMaterialSoftCollisionMode | For enable soft collision shell thickness mode | PhysicalMaterials/PhysicalMaterial.h |
|
| SoftCollisionThickness | float | Thickness of the layer just inside the collision shape in which contact is considered "soft". | PhysicalMaterials/PhysicalMaterial.h |
|
| StaticFriction | float | Static Friction value of surface, controls how easily things can slide on this surface (0 is frictionless, higher values increase the amount of friction) | PhysicalMaterials/PhysicalMaterial.h |
|
| Strength | FPhysicalMaterialStrength | PhysicalMaterials/PhysicalMaterial.h |
|
|
| SurfaceType | TEnumAsByte< EPhysicalSurface > | To edit surface type for your project, use ProjectSettings/Physics/PhysicalSurface section | PhysicalMaterials/PhysicalMaterial.h |
|
| UserData | FChaosUserData | PhysicalMaterials/PhysicalMaterial.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
FPhysicsMaterialHandle & GetPhysicsMaterial() |
Get the physics-interface derived version of this material | PhysicalMaterials/PhysicalMaterial.h |
Overridden from UObject
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void FinishDestroy() |
PhysicalMaterials/PhysicalMaterial.h | ||
virtual void PostEditChangeProperty
(
FPropertyChangedEvent& PropertyChangedEvent |
PhysicalMaterials/PhysicalMaterial.h | ||
virtual void PostLoad() |
PhysicalMaterials/PhysicalMaterial.h | ||
virtual void Serialize
(
FArchive& Ar |
PhysicalMaterials/PhysicalMaterial.h |
Static
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
static EPhysicalSurface DetermineSurfaceType
(
UPhysicalMaterial const* PhysicalMaterial |
Determine Material Type from input PhysicalMaterial | PhysicalMaterials/PhysicalMaterial.h | |
static void RebuildPhysicalMaterials() |
PhysicalMaterials/PhysicalMaterial.h | ||
static void SetEngineDefaultDestructiblePhysMaterial
(
UPhysicalMaterial* Material |
PhysicalMaterials/PhysicalMaterial.h | ||
static void SetEngineDefaultPhysMaterial
(
UPhysicalMaterial* Material |
PhysicalMaterials/PhysicalMaterial.h |
Deprecated Variables
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| DestructibleDamageThresholdScale_DEPRECATED | float | How much to scale the damage threshold by on any destructible we are applied to | PhysicalMaterials/PhysicalMaterial.h | |
| PhysicalMaterialProperty_DEPRECATED | TObjectPtr< class UDEPRECATED_PhysicalMaterialPropertyBase > | PhysicalMaterials/PhysicalMaterial.h |