hi,
im using this code to rotate my 3d object
var rotateSpeed = 20.0;
function Update () {
transform.Rotate(Vector3.down, Input.GetAxis("Horizontal") * rotateSpeed * Time.deltaTime);
// Slowly rotate the object around its X axis at 1 degree/second.
transform.Rotate(Vector3.right, Input.GetAxis("Vertical") * rotateSpeed * Time.deltaTime);
}
i can rotate my objects perfectly with W,A,S,D or the arrows. My quistion is how can i put a Key like W in a gui button. So if you press the gui button(W) it will rotate my object.
greetz