Like the famous game line runner, I want to make my character jump when I touch the right half of the screen. And slide on the left side… How do i do this? invisible gui??
How can I make invisible gui?? New to these stuff
Alternatives would be great.
Thanks
touchCount = Input.touchCount;
for ( var j = 0 ; j < touchCount ; j++ ) {
touch = Input.GetTouch(j);
if(touch.position > Screen.width*0.5){
//right side action
}
if(touch.position < Screen.width*0.5){
//left side action
}
}
Thanks
But I’m not good at coding can u make me a really simple scene that if i touch the left side the character will jump.
That’s It!!?
I’m not familiar with implementing the codes…
Thanks in advance
Ps: my email is dbsrb43@gmail.com
Just stick that in the update function of your code (you most likely want it in your player code) and it should work. Of cource you need to add the code for the jump and slide things in place of the comments in the above code.