Controlling rotation of an object with vgui in iphone

in the example of the startrooper i could see how the slider on the right (for iphone) can control the value of the translation of the the null called speed.

i want to create a script that i can drag on other objects than will control the rotation of the object.

var newobject; transform;

function update ()
{
var y = the value of the position of y of the object newobject

transform.Rotate (0, y, 0);

}

thanks for helping me :slight_smile:

maybe if you write in the iphone developper section you ll have more Helps. :wink: :wink: :wink: :wink:

see this code

function Update () { 

     for(touch in iPhoneInput.touches){ 
      if(touch.phase == iPhoneTouchPhase.Moved || touch.phase == iPhoneTouchPhase.Began) {          
         transform.Rotate(Quaternion.identity.x, touch.position.y, Quaternion.identity.z);
      }
     }
}

Scinfu

Moving this thread in 3… 2… 1…