How to change dynamically the mass scale of a static mesh with blueprints?

Hi,

I’m using the FPS blueprint and I’d like to know how I can change the mass scale of a static mesh in real time, using the blueprint graph event.

I’m aware there’s a solution for C++ (A new, community-hosted Unreal Engine Wiki - Announcements - Unreal Engine Forums , is there any way to do the same with blueprints ?

Thanks !

Hi V3Ri,

You can do this with a Physical Material applied to the asset and change the density value of it through blueprints. Below I will include some screenshots on how you might set this up (the Event Tick is just for testing purposes).

However, there is a issue with this process at the moment. If using Play-In-Editor or New Editor Window mode, it doesn’t just change the density while playing but changes it permanently in the editor. I have entered this in our tracking software as TTP# 343946 and our developers will be looking into it.

Hi !
I’ll try this out right now, thanks for your answer !

Is this still possible? I can follow the screenshot up until the Set node, which doesn’t exist as far as my dropdown is telling me.

Try dragging out the blue Return Value of the “Get Physical Material” node and/or disabling context sensitivity.

Yeah, I’ve tried it both ways. I can get the density on the physics material, I just can’t seem to set it directly as shown in the screenshot. If it’s still possible, I’d love to know how. And if it isn’t, I’d like to at least know for sure. I’m using 4.6.0 for reference.

Hi Eskimo,

I just found out that it isn’t possible to set these values in the editor as of 4.6. It was found that allowing certain physical material variables to be edited can sometimes cause major errors in a project. So these variables are now read-only.

Cheers,

TJ

Thanks for the answer TJ! Is this something that’s coming back in a later version, or it’s just never going to be possible?

It isn’t out of the question, it’s just currently a limitation of the engine. It maybe looked into again later on. With added features it may open this up to more stable functionality.