Pins wobble

Hi,

My pins wobble so this messes up whether the pins are standing or not. The wobble is very slight - in the first instance it prints that the pins are all standing. On the next iteration to print - it changes which are standing or not.

	void Start () {
        print(name + "," +  IsStanding());
	}
	
	// Update is called once per frame
	void Update () {
        print(name + "," + IsStanding());
    
    }

    public bool IsStanding()
    {
        float tiltZ = Mathf.Abs(transform.rotation.eulerAngles.z);
        float tiltX = Mathf.Abs(transform.rotation.eulerAngles.x);

        print("Z tilt is " + tiltZ);

        if(tiltZ < standingThreshold)
        {
            return true;
        } else
        {
            return false;
        }
    }

I’ve noticed that the angle of the pins in the x direction is -90.00001 (I change this to -90 and there is still a wobble - note this is on the collider and renderer rather than the pin itself). I noticed however on the video that the pins x,z,y angles are 0…so could it possibly be i’ve not set something up correctly?

In the Pin.cs script, modify the Raise() and Lower() as follows:

public void Raise(){
    if (IsStanding()) {
        rigidBody.isKinematic=true;
        transform.Translate(new Vector3 (0,heightToRaise,0), Space.World);
    }
}

public void Lower(){
    transform.Translate(new Vector3 (0,-heightToRaise,0), Space.World);
    transform.rotation = Quaternion.identity;
    rigidBody.velocity = Vector3.zero;
    rigidBody.isKinematic = false;
}

The pins should stop wobbling.