playMaker

Author Topic: half side touch to control character invisible gui?  (Read 2701 times)

dbsrb43

  • Guest
half side touch to control character invisible gui?
« on: February 12, 2013, 11:25:59 PM »
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
http://www.youtube.com/watch?v=05vEaheWVss

escpodgames

  • Hero Member
  • *****
  • Posts: 682
    • View Profile
    • Assets
Re: half side touch to control character invisible gui?
« Reply #1 on: February 13, 2013, 12:55:43 AM »
Easy - Use touch position

Get touch info Action will give you the X and Y position of the touch (normalized)
(the bottom left is 0,0 and top right 1,1)

Float compare - if touch x is greater than 0.5 its a right hand side touch if its less its a left hand side touch.

Hope that makes sence, I can show an example if that helps.

dbsrb43

  • Guest
Re: half side touch to control character invisible gui?
« Reply #2 on: February 13, 2013, 06:31:42 AM »
I'm having a hard time using floats....
maybe, can u make a really simple scene with this??
action could be really basic. For example Umm.. if left side is touched the cube deletes...
I would be able to do it myself from there on..
my email is dbsrb43@gmail.com
If u can screen capture some steps and send it to me, that would be awesome
Thanks in advance

escpodgames

  • Hero Member
  • *****
  • Posts: 682
    • View Profile
    • Assets
Re: half side touch to control character invisible gui?
« Reply #3 on: February 13, 2013, 05:13:56 PM »
Here ya go -



Uploaded with ImageShack.us

dbsrb43

  • Guest
Re: half side touch to control character invisible gui?
« Reply #4 on: February 17, 2013, 06:23:25 AM »
Thanks, get the idea.. but i've made the variable called Touch_x and did what the screencap told me to do....
But nothing happens in mobile.. not getting deleted??
What type of Touch_x has to be?? (in the variable drop down thingy, when created a variable, the drop down to change the type.??
thanks

escpodgames

  • Hero Member
  • *****
  • Posts: 682
    • View Profile
    • Assets
Re: half side touch to control character invisible gui?
« Reply #5 on: February 17, 2013, 07:21:13 PM »
touch_x should be a float ... also just noticed I didn't make the get touch info Every Frame (the tick box at the bottom)

dbsrb43

  • Guest
Re: half side touch to control character invisible gui?
« Reply #6 on: February 18, 2013, 01:44:44 AM »
Hmmm but what is this??/
I've uploaded a video for my problem..
http://www.youtube.com/watch?v=BSbujO2HEUg&feature=youtu.be
What's wrong??/

escpodgames

  • Hero Member
  • *****
  • Posts: 682
    • View Profile
    • Assets
Re: half side touch to control character invisible gui?
« Reply #7 on: February 18, 2013, 02:03:15 AM »
The only thing i can see is the compare float is above the touch info action ... but that should still work :S

Are you actually trying this on a mobile device? when you said "touch" did you actually mean on an iPhone/ipod/ipad/ android?
« Last Edit: February 18, 2013, 02:05:59 AM by LampRabbit »

gamedivision

  • Full Member
  • ***
  • Posts: 227
    • View Profile
Re: half side touch to control character invisible gui?
« Reply #8 on: February 18, 2013, 02:34:39 AM »
Guessing without actually testing,I would have an ngui button delete the image and font,using only the collider make it half the size of the screen,then use on OnClick event

dbsrb43

  • Guest
Re: half side touch to control character invisible gui?
« Reply #9 on: February 18, 2013, 05:23:15 AM »
Yes I've tested on my droid and still has a same effect...,

dbsrb43

  • Guest
Re: half side touch to control character invisible gui?
« Reply #10 on: February 18, 2013, 05:31:51 AM »
Can u create a simple scene for me?? I can test it on my device.
That would be nice^^

escpodgames

  • Hero Member
  • *****
  • Posts: 682
    • View Profile
    • Assets
Re: half side touch to control character invisible gui?
« Reply #11 on: February 19, 2013, 03:50:52 PM »
I think the best thing you could do is go through the Playmaker iOS tutorials, thats where I first started.

http://www.youtube.com/playlist?list=PLD8AAC983AAD87D01

Setting up onscreen debug GUI text is always a good way to test on mobile platforms - touch positions, touch count, playmaker states etc

Take a look and if you still cant get it to work, ill make you a scene (and test it)