How can i make the character move forward when the user touches a certain part of the phone screen.
I have tried this below, but not sure what UPText and UpStyle are:
if(GUI.Button(Rect(Screen.width/2+195,Screen.height-130,40,40), UpText, UpStyle)){
transform.localPosition += transform.forward * speed * Time.deltaTime;
}
Can anyone help?
goat1
January 1, 2015, 11:16pm
2
izeko2004:
How can i make the character move forward when the user touches a certain part of the phone screen.
I have tried this below, but not sure what UPText and UpStyle are:
if(GUI.Button(Rect(Screen.width/2+195,Screen.height-130,40,40), UpText, UpStyle)){
transform.localPosition += transform.forward * speed * Time.deltaTime;
}
Can anyone help?
You’re pretty much in a section of the forums with unproductive gossips. I’d suggest though using the free Unity Technologies package ‘Unity 4.6 Sample Assets’ in the asset store. It has 2 or 3 character controllers that pretty much already to that for you.
1 Like
Thanks for the reply. I will take a look at this.