From c976d190a5c2c0a2fe88c711666f187ee20043fc Mon Sep 17 00:00:00 2001 From: Wojtek Figat Date: Sun, 1 Jan 2023 16:38:50 +0100 Subject: [PATCH] Add `Tag` to `PhysicalMaterial` for physical surfaces tagging --- Source/Engine/Physics/PhysicalMaterial.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Source/Engine/Physics/PhysicalMaterial.h b/Source/Engine/Physics/PhysicalMaterial.h index b87cb5035..8716833a7 100644 --- a/Source/Engine/Physics/PhysicalMaterial.h +++ b/Source/Engine/Physics/PhysicalMaterial.h @@ -4,6 +4,7 @@ #include "Types.h" #include "Engine/Core/ISerializable.h" +#include "Engine/Level/Tags.h" /// /// Physical materials are used to define the response of a physical object when interacting dynamically with the world. @@ -69,6 +70,12 @@ public: API_FIELD(Attributes="EditorOrder(10), EditorDisplay(\"Physical Material\")") float Density = 1000.0f; + /// + /// Physical material tag used to identify it (eg. `Surface.Wood`). Can be used to play proper footstep sounds when walking over object with that material. + /// + API_FIELD(Attributes="EditorOrder(100), EditorDisplay(\"Physical Material\")") + Tag Tag; + public: /// /// Gets the PhysX material.