Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: MrMitch on February 02, 2014, 09:12:33 PM

Title: 2D Finger Tracking [SOLVED]
Post by: MrMitch on February 02, 2014, 09:12:33 PM
So i've been trying to make a 2D object track my finger but it doesn't seem possible with the current actions due to how 2D coords seem to work.

Does anyone know a good workaround or am i missing something?
Title: Re: 2D Finger Tracking
Post by: jeanfabre on February 03, 2014, 05:38:00 AM
Hi,

you need to use this action:

http://hutonggames.com/playmakerforum/index.php?topic=272.msg1087#msg1087

then you can inject your touch position. you define your fictive plane in 3d where you want that touch position to be express and done.

bye,

 Jean
Title: Re: 2D Finger Tracking
Post by: MrMitch on February 03, 2014, 07:42:04 AM
Thanks but i've no idea how to use this action but i'll keep trying and my game is being made all in 2D so will this even work?
Title: Re: 2D Finger Tracking
Post by: jeanfabre on February 04, 2014, 06:02:37 AM
Hi,

 Yes. Unity went for a very weird path with Unity 2d unfortunatly... It's still very much all 3d after all. so this action still work, simpls define the fictive plane to match the camera orientation.

bye,

 Jean
Title: Re: 2D Finger Tracking
Post by: MrMitch on March 06, 2014, 05:55:30 PM
Hey sorry to resurrect a mostly dead thread but i've finally come back to dealing with this.

So this is my setup, it detects touches and does move my object but only to one location and it won't move again.

I'm using Touch Event.

What am i doing wrong?
Title: Re: 2D Finger Tracking
Post by: MrMitch on March 10, 2014, 07:23:48 AM
Anyone have any suggestions?
Title: Re: 2D Finger Tracking
Post by: jeanfabre on March 11, 2014, 07:29:22 AM
Hi,

 Uncheck "normalize" it recompute the screen pos to be within 0 and 1, 1 being the full width, so your object ends up beiny position in a 1 unit square position in space, not what you want :)

bye,

 Jean
Title: Re: 2D Finger Tracking
Post by: MrMitch on March 11, 2014, 08:37:59 AM
It works!

Thanks Jean :)