Hi iām newbie please suggest me about how to adapt control of movement in Unity 3D into iOS device any one who want to help me and any one who have informations about development of iOS version please tell me ![]()
Thanks so much .
2 Answers
2if u want to using buttons use this it will work in unity 3d and ios
void OnGUI()
{
if(GUI.RepeatButton(new Rect(Screen.width/10,Screen.height/1.5f,Screen.width/15,Screen.height/10),"up"))
{
transform.Translate(Vector3.forward*Time.deltaTime*50);
}
if(GUI.RepeatButton(new Rect(Screen.width/10,Screen.height/1.15f,Screen.width/15,Screen.height/10),"down"))
{
transform.Translate(Vector3.back*Time.deltaTime*50);
}
if(GUI.RepeatButton(new Rect(Screen.width/40,Screen.height/1.3f,Screen.width/15,Screen.height/10),"left"))
{
transform.Rotate(Vector3.down, 90*Time.deltaTime);
}
if(GUI.RepeatButton(new Rect(Screen.width/5.6f,Screen.height/1.3f,Screen.width/15f,Screen.height/10),"right"))
{
transform.Rotate(Vector3.up, 90*Time.deltaTime);
}
}
other wise,
u can use joystick for the movement in ios. the standard package is present in standard assets mobile in the unity itself.
so u try it once.
In menu->assets->import package->standard assets(mobile)
I will be code in I appreciate in your kindness dude Thx a lot.
actually it is not js script it is cs script. try it in the c# script. u will definetly get it
ā mohanrao164