Adding More Variable Types to PhysicalMaterial.h

Hey there,

So I was able to add some variables to PhysicalMaterial.h . I also tried to add something more complex like a MaterialInterface as you do with include “Materials/MaterialInterface.h”
reference to it and had no problems (with my limited knowledge)

	UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = PhysicalProperties)
	TSoftObjectPtr<UMaterialInterface> TestInstance;

Also you need to add Engine dependency to PhysicsCore.Build.cs or if there is a dependency.

When I directly edited the builded engine code however I get errors similar to your output, however when I build the engine from source have no issues as modified engine.

For that please https://github.com/EpicGames/UnrealEngine access to Epic organisation and access UE source and follow the instructions to build from source. After that you can modify the code as allows. You want to contribute to Unreal Engine? Here’s how!

This being said, I would like to give a heads up for couple of things, just as opinion.
As logic I would expect here to have phsyics properties and coralated things as another class, like sound etc.

However If I was building a physics related feature in Engine, let’s say Sound Propagation which is coralated with porosity and density I would expect it to be listed here. That is a nice feature important for some of the competetive games like Siege. Can be many other physical properties like hardness etc. not subject of the this thread.

Or let’s say I want to build a new physics feature as Heat Dispersion. I would expect to see Heat Dispersion Coefficient to be here as well as melting point , freezing point etc. So in future I can add that to world landscape material and if there is a heatsource in game like a fireplace, I can do various things with physics like: melting snow, increasing the damage received from fire with distance, changing material visual effects like red hot metal etc. gameplay mechanics, like make stamina drain faster if you are in a very cold zone :smiley: Many possibilities so it creates even more believable world with minimal effort.

However I would not expect to see a SoundFile, as physical material property, however can be if you need to, Imo those can be another class.

Let me know if this was helpfull.

PS: Thanks also your question push me to make space and time for building the source in my local development space.

1 Like