Is It possible to change the friction of an object via blueprint?

Hi ,

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 .

Thanks

Hello DaveHall17,

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).

17511-frictionhelp.png

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.

Thanks Rudy , just realised it was not working because I am using 4.2 instead of 4.4 .

Did this stop working in later versions?
Im not able to acces any physical material parameters.

I use 4.9 now

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.

Hello Beervangeer,

I have a few questions for you that will help narrow down what issue it is that you are experiencing.

Quick questions:

  1. What version of the engine are you using?
  2. Can you reproduce this in a clean project?
  3. If so, could you provide a detailed set of steps to reproduce this issue on our end?
  4. 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?
  5. Could you provide screen shots of any materials that may be involved with this issue?

Hi Rudy ,

Are any plans to implement this feature or is there another way to change the physics properties ?

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.

Link: Can't Set Physical Material Properties through Blueprint - Blueprint - Epic Developer Community Forums

Make it a great day

So do you have a suggestions to achieve this in a different way?

Thats possible, but makes changes very limited

Yes I have tried this , but it does not give you that much control and it is also quite time consuming to implement .

Hello DaveHall17,

A workaround that may be viable depending on your needs would be to swap between multiple physical materials.

I do not have other suggested workarounds for this issue at this time.

This doesn’t seem to work anymore. I’m using v4.13.1-3142249

Yes I can confirm that there seems to be a regression in this functionality. v4.14.

Hello mattr.taylor,

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.

Link: Unreal Engine Issues and Bug Tracker (UE-5650)

I have also written up a feature request for creating instances of physical materials to allow for runtime changes.

Link: https://jira.it.epicgames/browse/UE-39498

Make it a great day

Is it possible to change the physical material of a specific bone or body in a physics asset through blueprint?

Hello Maim Games,

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.

Make it a great day