How to create the rotate system like in lumber tycoon 2 grab system

WHEN you grab an object in lumber tycoon 2, the objects orientation is always facing the way you picked it up no matter where you look, so like

if you were picking up a log
and then you looked right
the orientation would be facing you the way you picked it up

how can I make a system like it?

(I’m not creating lumber tycoon 3 I just want this mechanic in my grabbing system)

Do you want it to face the way the character is facing or the way the camera is facing?

Whenever the player picks up the part, I want it so that when the player moves their camera for example 90 degree, the part is still when it got picked up, but the part is facing to the character head