checking angular magnitude

simply what i am trying to do is get the speed in which my wheel is rotating.
i have a script that prints this into a varible float named speed. and im useing

speed = rigidbody.angularvelocity.magnitude…

this works fine but if the object goes backwards it also gives me a +number, i simply want a negative number or none. so basically i only want to measure the magnitude it the wheel is spinning forward.

im going to try a few things but is there a simple command i could use

You are using rigidbody.angularVelocity.magnitide . rigidbody.angularVelocity actually returns a Vector3 and by using magnitude you are finding out the magnitude of the resultant vectors which is always positive, simply because its a magnitude, an amount.

To get better results you can use the same statement without magnitude, but keep in mind that the variable speed that you have should be of the type Vector3 and not float. Then you can access speed.x, speed.y and speed.z, they are the individual components that make up the vector.

Now you can check if lets say, is speed.x > 0 (positive) or speed.x < 0 (negative).

Hope this helps!