Force Add Rotation on Rotation-Locked actor?

I have an actor that I want to move using physics, but I don’t want to rotate in response to collisions. So I lock the rotation axes.

But I still want to be able to manually rotate this actor in code/blueprints. Add World Rotation has no effect when the axes are locked.

How can this be done?

Assuming you’re using an AStaticMeshActor. If not, do GetBodyInstance() on your component of choice. Regardless, not sure if this will work, but give it a try anyways:

if (FBodyInstance* BodyInstance = GetStaticMeshComponent()->GetBodyInstance())
{
    if (FPhysicsActorHandle ActorHandle = BodyInstance->ActorHandle)
    {
        if (Chaos::FGeometryParticleHandle* ParticleHandle = ActorHandle->GetHandle_LowLevel())
        {
            BodyInstance->bLockRotation = false;
            ParticleHandle->SetR(Rotation);
            BodyInstance->bLockRotation = true;
        }
    }
}

Let me know.

Nothing was working, so I just ended up setting the Max Angular Velocity to zero and working around it.