Ugh Multitouch? *Help* Please:)
chosenonestudios
Member Posts: 1,714
Sorry guys, I know there has to be something around here on this, but it eluded me for too long.....
In my game you have to move around two separate actors at the same time... So how would I go about doing this...
You use touch 1, touch 2, etc. right?
If so..... how?
In my game you have to move around two separate actors at the same time... So how would I go about doing this...
You use touch 1, touch 2, etc. right?
If so..... how?
Comments
Check out CodeMonkey's joystick demo on how to handle this.
But, I did find this thread that you posted on.....
http://gamesalad.com/forums/topic.php?id=2806#post-22895
And I kinda have it working, but I need help with this one part...
"set a rule that if a touch occurs on screen right...control player 1's stuff...and if a touch occurs on screen left...then that controls player 2 stuff.
You may still need to have a touch 1 and touch 2...but it would be irrelevant whose touch it is because the screen is separated and all actors on the screen are tied to a touch's X coord. origin (if landscape orientation).
I think that would work...haven't tested it."
How would I set this up, if touch occurs on top tie it to player 2, on bottom player 1?
Can't figure out how to do that
Thanks!
I have an actor for each touch attribute set. Each actor constrains its position to a specific touch point. Also there is logic to reset the values of the touch positions depending on release of the touch.
On the joystick actors, they look for the collision/overlap with one of those actors and adjusts its position accordingly.
CodeMonkey's joystick demo:
http://gamesalad.com/wiki/how_tos:gsc_controls#how_do_i_make_a_joystick_control
Edit: Dammit. I should have refreshed before I got up to go to the bathroom ... ;-)
Thanks CodeMonkey! appreciate it...
Sorry Guys been trying to get this to work for days I'm kinda pissy about it right now..
What I need help with is figuring out which touch to use and how to switch them if their lifted up...
How to switch between touch 1, 2 etc. it would be greatly appreciated I just can't figure it out...
-sigh-
If you know a better way to do it too, that would also be helpful.. Thanks!
You need 5 duplicates of everything, in ALL of your touchable actors.
The good news is that you don't have to worry about switching the touches...
or about restricting the touches to certain areas of the screen...
check out this link:
http://gamesalad.com/forums/topic.php?id=6988&replies=19#post-45994
Good Luck!