Playmaker Forum
PlayMaker Help & Tips => PlayMaker Help => Topic started by: dbsrb43 on February 13, 2013, 01:25:59 AM
-
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
-
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.
-
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
-
Here ya go -
(http://img405.imageshack.us/img405/9940/touchu.jpg) (http://imageshack.us/photo/my-images/405/touchu.jpg/)
Uploaded with ImageShack.us (http://imageshack.us)
-
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
-
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)
-
Hmmm but what is this??/
I've uploaded a video for my problem..
What's wrong??/
-
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?
-
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
-
Yes I've tested on my droid and still has a same effect...,
-
Can u create a simple scene for me?? I can test it on my device.
That would be nice^^
-
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)