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:
Add a Static Mesh to the level that has a Material with a Physical Material defined in it.
Get a reference to that Static Mesh Actor in the Level Blueprint.
Drag a wire from the Static Mesh Actor to add a Get Static Mesh Component node.
Drag a wire from the Static Mesh Component node to add a Get Material node.
Drag a wire from the Return Value output of the Get Material node to add a Get Physical Material node.
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!
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.
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.
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.