combining and un combining objects in real time

Im just curios, is there a way to have objects combine and un combine when you wan them to in the game, say you have two wood planks and you want to nail them together hand have them act as a single object, then you come back press a button and they are un combined and go back to being single objects.

Im thinking it might be possible to use the"parent" actuator to do something like this.
it has the ability to create and remove parents in game.

Ah you idea is like mine my game has plank and nail too.
and when parent physic and mass is really mess so i use constraint too combine them together and for uncombine just unconstraint id you want

the only problem is i need it to be more dynamic say you have one plank on the floor and your nailing the other one to it but i need it so you can nail it at any given spot on the plank on the floor, just like in real life. So how would i tell the plank being nailed to attache to the other one?

some thing like set constraint pivot to ray hit point from camera will work.
My game is just contstraint and lock it together so I can’t help much.

does anyone have some ideas on this?

Set an empty to the pivot pint and parent it to the plank, then parent the empty to the parent plank

ya i could do that but i need objects to parent in real time say like you go chop a tree down and and five planks of wood fall from it on the ground and then you go find a nail laying on the ground go over and pick it up with by pressing “E” when next to it bring it over to the plank rotate it so its sticking up and place it on the plank then hit a button to parent the nail to the plank.