How to constrain physics rotation but still allow to manually set rotation?

I want to constrain the rotation of a physics object so it can only rotate on the Z axis when simulating physics, but I still want to be able to manually set the rotation without any constraints. But it seems that when the object’s rotation is constrained in the physics properties, the ‘set rotation’ function is also constrained.
In Unity you can constrain the rotation of a rigidbody but still be able to set the rotation manually. Is this possible in UE4?