Hi, I've been struggling to do something that is obviously not that difficult because I don't see a thread with anyone else having the same problem! Basically, I have a vehicle and I want to detect if it spins, and if so, how many times. I've coded it once, and it detected spins that weren't there. Now I've done it again and it doesn't detect any. This is my code: private void TrackRotations() { float facing = Chassis.localEulerAngles.z; float angle = facing - _lastRotationPoint; _totalRotations += angle; _lastRotationPoint = facing; var rotCnt = TotalNumberOfRotations; if (_highestRotation == rotCnt) { return; } Any help would be greatly appreciated because this is driving me nuts now!
First help, is to use Proper code tagging Using code tags properly But regarding question, RigidBody has angular velocity, which may be of use for you.