Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: jasperPT on October 13, 2013, 11:28:23 AM

Title: [SOLVED] Touch Action that does the same thing as Mouse Pick?
Post by: jasperPT on October 13, 2013, 11:28:23 AM
I need to figure out a way of using a touch input the same as a Mouse Pick so that I can store what Game Object has been touched.

Im sure this is quite simple, but I can not for the life of me get it to work.

"Touch Object Event" does not work because it requires you to know what object you want to be touching.

Any help would be much apreciated.

Cheers,
Jasper

EDIT:

On another similar note, what I am trying to do is as follows:

Finger down.
 - Check to see if the correct object was selected
 - Get position of the object
 - Compare my current finger position to the position of the object (every frame)
 - I need this to be every frame so that I can change the graphic depending on where the finger is relative to the object selected (like a mouse down menu)

Finger up
 - If my finger was released while the finger was over the object then shoot a bullet.

- If my finger was 1 unit above (screenspace Y) to my selected object then create a wall.

Note that this will be happening in multiple locations at once, so it needs to know independently what finger is touching in what location.
Title: Re: Touch Action that does the same thing as Mouse Pick?
Post by: jgalvezpa on October 13, 2013, 01:55:37 PM
Mouse Pick works for touch and mouse
Title: Re: Touch Action that does the same thing as Mouse Pick?
Post by: jasperPT on October 13, 2013, 01:56:49 PM
yes but I need to use touch. As I am having two players input on the same screen at the same time in different locations. And you can not do this with mouse actions.

Title: Re: Touch Action that does the same thing as Mouse Pick?
Post by: jgalvezpa on October 13, 2013, 02:15:19 PM

like  i said use Mouse Pick and then Touch event action.
the mouse pick will store the object that you are touching
Title: Re: Touch Action that does the same thing as Mouse Pick?
Post by: jasperPT on October 13, 2013, 05:13:46 PM
yes this works fine, but as soon as somone clicks somewhere else on the screen my selection will change. This is due to me needing to use it on every frame to figure out what I have selected or what position I am currently clicking on. (there will be multiple clicks and holds going on screen at the same time to do different things)

Sorry I should have been a little more clear, I have updated the original post to show what I need.
Title: Re: Touch Action that does the same thing as Mouse Pick?
Post by: jasperPT on October 13, 2013, 05:48:20 PM
Never Mind I solved it using get touch info and screen pick after a rather long brain bashing against the computer.

Cheers for the help though!