Applying constraints to a a rigidbody/physics enabled component

I’m basically looking to do Applying 2D Physics | Unreal Engine Documentation in C++

CollisionComponent->SetSimulatePhysics(true);

How can I apply constraints? I haven’t found any good examples yet.

There is a tutorial on creating dynamic constraint on the wiki:

You will find in it informations about the classes you need : UPhysicsConstraintComponent - FConstraintInstance

Basic informations on constraint there: Physics Constraint Component User Guide | Unreal Engine Documentation

But, to be honest, i am battling with it a little, at least for initialization of physically based aactor.
Defered Attachment is the key, in this particular case.

For physics attached component, i used:

component->AttachParent = parent ; // Deferred attachment

instead of

component->AttachTo(parent); // direct attachment

Cheers