Unsure if this is what you are looking for but to stop an object moving on the Y Axis use.
transform.eulerAngles = new Vector3(0,transform.eulerAngles.y,0);
Untested*
Peace, Aaron Lewis
Unsure if this is what you are looking for but to stop an object moving on the Y Axis use.
transform.eulerAngles = new Vector3(0,transform.eulerAngles.y,0);
Untested*
Peace, Aaron Lewis