Picked Up Item Snapping to Certain Angle

In short I’m trying to make it so when I pick up an item, it snaps to a certain rotation as to ‘fit’ in the players hand without looking stupid.

I’ve got my setup where when you pickup an object, the object becomes a parent of the controller that picked it up.

I’ve tried a bunch of solutions and none of them will give me the angle I want

The degrees I’m trying to obtain specifically are x=-34, y=0, z=180 and are called angx, angy, and angz respectively.

item.transform.localEulerAngles.Set(angx, angy, angz);
item.transform.localRotation.Set(angx, angy, angz);
item.transform.rotation.Set(angx, angy, angz);
item.transform.EulerAngles.Set(angx, angy, angz);

I’ve tried all those different ways of changing the rotation once picked up and nothing works, you can still pick it up from any angle and it wont snap

Hi,

I think you are missing matching transform after you add parent.

This should do it:

oPickup.transform.parent = oCollector.transform;
oPickup.transform.SetPositionAndRotation(oCollector.transform.position, oCollector.transform.rotation);
oPickup.transform.Rotate(-34, 0, 180, Space.Self);