I’ve come across another challenge with this spinning code. I’m now using it to spin a steering wheel, then have the car react as a result.
I don’t understand why the “rotation” value of my item starts at 0, and sometimes:
-
goes up to 180 as I turn it to the right, and flicks to a negative value (say -179) when I get completely upside down, using negative values increasing to 0 as I continue to turn the item to the right and back to vertical (0).
-
goes up to some other value (say 43) as I turn to the right, then flicks to a large negative (-317), increasing to zero as I continue to turn to the right.
-
goes all the way to 360 as I turn to the right, and back to 0 when I return to the top.
It seems to change based on where on the wheel I grab to start turning. Bizarrely the car seems to take on the same rotation numbers at the same time (i.e. -55 on the wheel = -55 for the car, even though -55 may be a completely different on-screen angle in example 1 vs example 2).
Is there a way to make this consistent so that I can use the difference between the wheel rotation and the car rotation to define the torque that I want to apply to the car?
Thanks,
Nathan.