How can I disable sleeping for a body?

Is there a way to completely block a body from sleeping? I have this problem and the solution is quite bad for a lot of bodies. Essentially I’d like to call:

BodyInstance->GetPxRigidDynamic()->setSleepThreshold(.0f);

But it doesn’t seem to be possible to directly access PhysX functionality.

I managed to get access to PhysX by inserting the following lines into *.Build.cs:

  1. PrivateDependencyModuleNames.AddRange(new string[] { "PhysX" });
  2. Definitions.Add("WITH_PHYSX=1");

And then setSleepThreshold() did the trick. I’d love to have this natively in the editor, perhaps using another family beyond Normal and Sensitive.

Oh, I’m still trying to find out if there are any legal issues concerning direct PhysX use.