Hi
i have a simple code to rotate a 3D object.
and works fine, but when I press the finger, only rotate once,
and I have to touch a lot of times to rotate continuously. (i dont want this)
I need to rotate the 3D object while the buton is pressing,
i mean
start to rotate while i have the finger touching the screen…
and stop rotate when I lift the finger.
it is posible ?
here is my simple code. some idea please ?
function OnGUI(){
if (GUI.Button( Rect( 10, 10, 64, 64), "rotate"))
{
rotate_left();
}
function rotate_left(){
transform.Rotate(0, 3, 0);
}
thanks a lot, any help will be apreciate please. !