Just a quick question, is there a way to zero out the transform and rotation in the inspector for child gameobjects? I want to animate a gun that has many different parts, and all of those parts have these small differences in position and rotations and would like all of them to be the same at 0 just to make things more neat. Thanks for any responses.
I’m not sure what you mean by “zero out”. You didn’t really explain your question in detail so it’s difficult to answer it. I was struggling if i should reject the question or not.
I just assume you mean that you want to set the local position and rotation to (0,0,0)? In this case you just do
Transform someTransform; // [ ... ] someTransform.localPosition = Vector3.zero; someTransform.localEulerAngle = Vector3.zero;
If that’s not what you meant you should edit your question and be more specific and clear about what you want to do. “zero out a transform” doesn’t have much meaning to me and would belong in the group of “filling a wall”, “throwing blue on the ground” and “writing a stone” which all doesn’t make much sense ^^. Maybe it’s a language barrier. I’m not a native english speaker.