Setting SetSimulatePhysics dynamically to false can't be undone

Branch: Binary

Build Version: 4.7.6-2513093

Problem: I can toggle physics simulation on a static mesh component on and off and it works until I try to add force or torque through an actor component. I can turn it on once but if I turn it off, it doesn’t simulate anymore even though IsSimulatingPhysics is returning true. The same behaviour occurs for components made in Bluprint and in C++.

Below, a basic Blueprint ActorComponent that reproduces the bug when applied to a Blueprint with a StaticMeshComponent. If I disconnect the AddForce from Event Tick, the Physics Simulation works just fine. On and Off. But, trying to add force or torque, it turns on once and, if I turn it off, it won’t simulate again.

I really hope this ain’t a bug and someone will tell me there’s a solution. But after a lot of testing, I do believe it’s a bug.

Hi RVillani,

I duplicated your setup and unless I’m misunderstanding, it is working on my end. I used a Blueprint Actor Component and a Mesh Component variable. The only difference is I used a larger amount of upwards Force.

Here is my results:

40559-setsimphysics01.gif

If you would like, feel free to post your .uassets for the Actor Component and the blueprint you are using it in.

Thanks for your attention, TJ!

At first I thought I was crazy or my engine was broken somehow because you did exactly the same setup as mine. The low force in mine made it float because I’ve lowered the mesh physical mass.

After fiddling with all the default physics setings that I suppose your mesh was using, I found the problem in an option I set on the project: Substepping to true (not the default).

By turning off substepping it worked, just like yours. So, I believe it’s a bug with the substepping system. Could you try to reproduce it? I know it’s an experimental feature and, for now, I’ll try to work without it. But it was helping a lot in my project’s quality.

Thanks again!

I see exactly what you mean now. It’s seems to only happen while all three of these things are happening:

  • Substepping is Enabled

  • An Actor Component is driving the blueprint

  • Click Events are used to toggle physics

I’ve entered it as JIRA UE-14634 in our tracking software and our developers will be investigating the issue further. We will post back here with updates as we have them.

Cheers,

TJ

Thank you, TJ! You guys at Epic are awesome!

It’s not everyday we see big companies giving attention to small users’ problems.

TJ, after some more testing I discovered you can remove the third condition from your list. It doesn’t have to be toggled by click events. Even from a Timer or DoOnce with delay etc… it stops simulating physics forever.

Thank for the additional info! I’ve added a comment to the JIRA to let the devs know.