playMaker

Author Topic: Problem with touch and move a 3d object in a 2D setting.  (Read 3816 times)

Slater

  • Full Member
  • ***
  • Posts: 123
Problem with touch and move a 3d object in a 2D setting.
« on: July 26, 2012, 09:34:15 PM »
Hi,

I'm new to Playmaker and pretty new to Unity. My friend has knowledge in Javascript but he has only been working in Unity for a short while and now we have gotten stuck and need your help.

We are creating an interactive children's book and have set the Camera to Orthographic and the size changes through a script he created depending on if it runs on Ipad or Iphone according to aspect ratio.

What we are getting stuck on is that we have been creating a 3d cube or a quad and been trying to create a state machine that would allow us to touch it and move it over the screen following the finger. We have for instance used touch object event and get touch info and set position. We have tried a few different approaches but end up on the same problems. If we use normalize the object moves but only in a very tiny little piece of the screen and is slow. If we dont normalize as soon as we move the finger the object teleports away, last we checked to somewhere -200 Y. Can anyone tell us what is going on. What are we missing?

I have nice curly hair and I would like it to stay that way and not get bold from tearing my hair off from this. Thanks :)

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Problem with touch and move a 3d object in a 2D setting.
« Reply #1 on: July 30, 2012, 04:58:51 AM »
Hi,

 study this thread, I think this is what you are after.

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

in your case, you would control an object instead of the camera but the principle is identical really.

bye,

 Jean