playMaker

Author Topic: 2D Finger Tracking [SOLVED]  (Read 2247 times)

MrMitch

  • Full Member
  • ***
  • Posts: 131
    • View Profile
    • Rage Quit Games - Coming Soon
2D Finger Tracking [SOLVED]
« on: February 02, 2014, 07: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?
« Last Edit: March 11, 2014, 05:38:25 AM by MrMitch »

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 14387
  • Official Playmaker Support
    • View Profile
Re: 2D Finger Tracking
« Reply #1 on: February 03, 2014, 03: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

MrMitch

  • Full Member
  • ***
  • Posts: 131
    • View Profile
    • Rage Quit Games - Coming Soon
Re: 2D Finger Tracking
« Reply #2 on: February 03, 2014, 05: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?
« Last Edit: February 03, 2014, 05:50:47 AM by MrMitch »

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 14387
  • Official Playmaker Support
    • View Profile
Re: 2D Finger Tracking
« Reply #3 on: February 04, 2014, 04: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

MrMitch

  • Full Member
  • ***
  • Posts: 131
    • View Profile
    • Rage Quit Games - Coming Soon
Re: 2D Finger Tracking
« Reply #4 on: March 06, 2014, 03: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?

MrMitch

  • Full Member
  • ***
  • Posts: 131
    • View Profile
    • Rage Quit Games - Coming Soon
Re: 2D Finger Tracking
« Reply #5 on: March 10, 2014, 04:23:48 AM »
Anyone have any suggestions?

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 14387
  • Official Playmaker Support
    • View Profile
Re: 2D Finger Tracking
« Reply #6 on: March 11, 2014, 04: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

MrMitch

  • Full Member
  • ***
  • Posts: 131
    • View Profile
    • Rage Quit Games - Coming Soon
Re: 2D Finger Tracking
« Reply #7 on: March 11, 2014, 05:37:59 AM »
It works!

Thanks Jean :)