I have a physics object that you can push around a level . I want to be able to increase and decrease the friction of the object during gameplay . I can do this by changing the Physical material , which is almost what I want apart from the change is very sudden .
Ideally I would be able to have the friction settings as a variable that I can change via a Blueprint timeline so that I have more control and the change is more gradual .I have tired this , but as yet I have not been able to access the friction settings for an object via blueprint .
If you would like to alter the friction settings of an object during game play you can try the following:
After setting this up all you will need to do is set up the system you would like to use to change the “AmountOfFriction” variable (in this case it’s a float).
Note: You will need to create a Physical Material and apply that to the material that is applied to the object that you would like to affect. You can do this by opening the material editor and selecting your Physical Material under the physical material tab in the details panel.
Create a material with a physical material setup. Then try to access the material in the blue print like in the screenshots.
You can get the parameters. But the set functions are not available.
I have seen on the forums that it was possible in older versions of Unreal.
I have a few questions for you that will help narrow down what issue it is that you are experiencing.
Quick questions:
What version of the engine are you using?
Can you reproduce this in a clean project?
If so, could you provide a detailed set of steps to reproduce this issue on our end?
When you say that you can not access any physical material parameters, are you saying that you do not have any available options when opening your physical material?
Could you provide screen shots of any materials that may be involved with this issue?
After doing a bit of digging I was able to find that this change was by design. Modifying those variables would modify the asset, not a local instance. I have also provided a link to the original issue below. Feel free to navigate to that thread for further information. I hope this helps.
After doing a bit of digging I was able to find that this change was made by design. I have provided a link to the public tracker. Please feel free to use the link for more information.
If you read above you will see that the only current workaround I have for modifying physical materials at run time in blueprints would be to swap them out for other physical materials. I hope that this information helps.