I am setting the rotation of a game object in some part of the code, as follows:
gameObject.transform.rotation = q1
where q1 is a quaternion with the new rotation I want for this game object. Immediately after the rotation is set to q1, the game object transform appears to be set correctly. I confirm this eg. via Debug.Log before I exit that function in my code. In the next Update call for this game object, I obtain the rotation and it’s not what I set it to, but it’s set to another value - say q2. The game object does not have a rigidbody attached to it. I have debugged my code and it does not set the rotation to q2. Is it likely the change to q2 is normal unity behaviour - and if so, how can I find out about where the object transform is set to q2.