for some very odd reason, the ball’s rotation on the y axis is always changing however the ball doesn’t move because of this so it wouldn’t affect my game
I either want to be able to set the ball’s rotation to zero on all axis or just declare s as the ball’s x axis. to set the rotation to (0,0,0) I still need to know how to find out how to check for the object’s velocity.magnitude on either the x or z axis, so how would I do that?
s = GetComponent<Rigidbody> ().velocity.magnitude;
this is the code I have been using and it works but as I said I now wanna be able to check for the object’s velocity.magnitude on one axis
I tried adding .x to the end of the code like this:
s = GetComponent<Rigidbody> ().velocity.magnitude.x;
but I just get an error, so if someone could help me out, that’d be great thanks