Playmaker Forum

PlayMaker Help & Tips => iOS Help => Topic started by: Slater on July 26, 2012, 09:34:15 PM

Title: Problem with touch and move a 3d object in a 2D setting.
Post by: Slater 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 :)
Title: Re: Problem with touch and move a 3d object in a 2D setting.
Post by: jeanfabre 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 (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