Changing limits to physics constraints

Hey everyone,
I have just made some skeletal mesh with static mesh attached to it via physics constraint. I created few nodes, which after I click help me to set all constraints (linear/angular) to free (to let the mesh fall of the skeletal one). I just wanted to ask if there is not easier way how to do it. I don’t mean it is hard to do, but I think it is unneccesary to have so many nodes to just make mesh free. Now I am asking everything in terms of performance. Not only in this case, but also in the future, if I come along something like this, if it is better to do in C++ than in Blueprints. I just think it is stupid to change everything axis by axis. Isn’t there some node which will change it all at once? Or does it even matter if one node will do it or more nodes will? Is the work still the same? I just want to understand the cost of using blueprints on performance instead of C++. I mean, in C++ you can call function directly on what you want to change, in blueprints, a lot of times happens there are functions on node you do not even want to use at that time. Does it cost some performance at all when you dont use some of that? I know it is stupid question af, but I want to know the principle so bad. Blueprint script in attachment.

You can set the same settings in the properties of component by selecting it in the component panel on the top left.

Heh, the thing is I have to change it during runtime, thats why I am making it via blueprints. At first it is locked, and then I need to set everything free.

Ohh, ok, didn’t understood it from the post. Anyway, performance wise there is no concern to it, just call it from an event meaning don’t call those nodes on every tick and it will be fine.
But I would do it in a different way, just remove constraint if it’s not necessary anymore and add it dynamically later when object needs to be constrained.

Dang, it is not in the picture but I actually destroy the constraint in the last node. Why I did not think about it earlier :D. Yea, that should do the trick. Thank you a lot. So if I think about it. If I am making one time function, there is not really need to think about performance right. I mean, like the result won’t be noticeable if it was done in c++ or blueprints.

I would expect performance difference to be negligible.