How do I make rotation one GameObject the rotation of another?

Hi, I am new to Unity and I am currently making a game and was wondering, how can I code something so that it’s X rotation follows another’s X rotation? If that makes sense? I know how to do it with the position but not with the rotation. Thanks Alot, Dean

Well, it’s the same, if you already know how to do it for position. One pitfall, though, is that you cannot use transform.rotation.x (it will do something different), use transform.eulerAngles.x instead.

PS: if this doesn’t give you the result you expected, we’ll need more info: How exactly do you do it for the position, are you interested in local or world coordinates, are the objects part of a hierarchy or are they place directly in your scene at top-level, etc.?