Turning physics on and off

I'm just wondering before I start a new project, can physics on objects be turned on and off?


I.e. The hero comes across 2 boxes side by side. He picks up the smaller one and puts it on top to create a staircase, and whilst carried, the box doesn't bounce off the player or other box
You can deactivate phys. body, it stops moving and producing collisions. Not sure now what's the method name. Look for SetActive or something like that
I'm just getting started with box2d so there may be better solutions.

If by "whilst carried", are you referring to the larger box: instead of turning off physics to add some kind of joint (e.g. weld) to "stick" the boxes together.

Original thread: https://box2d.org/forum/viewtopic.php?t=7876