Can't Set Physical Material Properties through Blueprint

Branch: Binary

Build Version: 4.6.0-2357962

Description: In the 4.6 Preview build there is no option to change any values on a Physical Material ( friction, density, etc. ) through Blueprint. You can get the values of those properties, but there is no ability to set them.

Unlike the previous 4.5.1 build where you can drag the Return Value output off of a Get Physical Material node to add Set Friction or Set Density nodes, for example.

Repro Steps:

  1. Add a Static Mesh to the level that has a Material with a Physical Material defined in it.
  2. Get a reference to that Static Mesh Actor in the Level Blueprint.
  3. Drag a wire from the Static Mesh Actor to add a Get Static Mesh Component node.
  4. Drag a wire from the Static Mesh Component node to add a Get Material node.
  5. Drag a wire from the Return Value output of the Get Material node to add a Get Physical Material node.
  6. Drag a wire from the Return Value output of the Get Physical Material node and search for “set”. Notice there are no results for “Set Friction”, “Set Density”, etc.

If this isn’t a bug and instead is by design then what is the correct way to dynamically alter the physical properties ( friction, density, etc ) of an object in-game? Thanks!

Hi Abe,

Thank you for reporting this. I was able to get a repro for this issue and have reported it (UE-5650).

I’ll post an update once I have a verified fix and any other relevant information.

Thank you!

Tim

Hi Abe,

The engineer assigned this issue has reported that this is done by design. I’ve reached out to ask if there is another way to set these parameters while in-game.

Tim

I ran into this issue while building a ‘gravity gun’. You need to be able to temporarily set mass to very low values while manipulating the object directly so it doesn’t send other physics objects is collides with flying off into space. Thanks for looking into it, would really like to be able to override via bp.

Thanks for the update, Tim. It would be very useful functionality, so I hope there is an alternative solution for adjusting those values.

I was able to find a way to create an override via blueprints by creating a material instance. I was then able to set a new physical material on the instance. Unfortunately, mass doesn’t seem to update/recalculate using this method. Maybe this could work for what you need, Abe, but I need a way to temporarily override mass at runtime via blueprints.

Hi Tim, I am currently trying to create a physx submarine and ran into this problem when trying to create a system of ballast tanks. A way to tell a physics body its new density and recalc mass, or just override the mass at runtime, would make this easier within the current systems.

Perhaps this could work through a mesh’s body instance? The values in the body instance don’t affect simulation ingame either when changed at runtime. The override should be possible across a primitive component, and for each bone’s body in a rigid body’s physics asset

For now I can just keep the mass constant and apply more or less buoyant forces to fake the effect but it seems like a waste when the engine already handles objects with variable mass. I may try getting this working in the engine myself but obviously an solution to this from Epic would be really nice and probably way better designed and consistent than any solution I come up with.

Hi, is still no solution? this is mandatory for my project, thanks in advance