Seems like a simple question, but regardless of how I approach the problem, I always end up with a non linear output. I’m looking for an output which will go from 0 to 1 (or 0 to 360) before resetting, or basically any linear interpretation of steadily rotating object, however when I use any of the below methods, it always increases steadily, reaches a point, and then decreases steadily.
For example, using
Debug.Log(transform.rotation.eulerAngles.x);will output between 270 and 90 only, increasing/decreasing steadily before changing direction. I’m using
transform.Rotate(1, 0, 0); to get my steady rotation and this seems to be working fine. Where have I gone wrong in attempting to get it to output linearly? (no change in direction). The object starts at 0,0,0 rotation. I have tried:
transform.rotation.x along with local rotation vairants of both. Nothing seems to work. Any advice?