playMaker

Author Topic: Touch input.  (Read 5500 times)

TIGGYsmalls

  • Junior Playmaker
  • **
  • Posts: 80
Touch input.
« on: June 03, 2013, 09:19:28 AM »
How do you use Touch GUI Event correctly?

I created an empty object and put a GUITexture on it. Then put a Touch GUI Event on the objects FSM.

How do I get the Store Hit Point as horizontal and vertical in the input manager?

Also, I take it you cant use Draw Texture from a FSM? you have to set a GUI Texture? Because the results of the Draw Texture action are much better.

I know the input is working because I can write out a GUIText and it changes. And when I store the output as an offset from the centre the end value seems wrong.
« Last Edit: June 03, 2013, 12:12:37 PM by TIGGYsmalls »

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Touch input.
« Reply #1 on: June 04, 2013, 02:25:57 AM »
Hi,

 the input manager has nothing to do with touches. Can you precise what you want to achieve?

 also, be careful, the reference are different from the view screen and the ui screen. one has the 0 at the bottom of the screen, the other at the top. Is this what you experience?

bye,

 Jean

TIGGYsmalls

  • Junior Playmaker
  • **
  • Posts: 80
Re: Touch input.
« Reply #2 on: June 04, 2013, 05:24:44 AM »
Ok, I want the bottom left control to add directional force as if you were using an analogue stick or even WASD. Keeping the movement relative to the camera.

The bottom right will control the cameras rotation and panning.

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Touch input.
« Reply #3 on: June 04, 2013, 06:20:29 AM »
Hi,

 Then you need to use my joystick bridge. Have you tried it?

http://hutonggames.com/playmakerforum/index.php?topic=1344.msg5793#msg5793


bye,

 Jean

TIGGYsmalls

  • Junior Playmaker
  • **
  • Posts: 80
Re: Touch input.
« Reply #4 on: June 04, 2013, 12:58:33 PM »
Works beautifully.

Getting this error though:

Assets/Scripts/Joystick.js(62,20): BCW0012: WARNING: 'UnityEngine.GameObject.active' is obsolete. GameObject.active is obsolete. Use GameObject.SetActive(), GameObject.activeSelf or GameObject.activeInHierarchy.

Don't know if that's important?

Got any ideas on how to get the input relative to the camera? Just need to add force from the XZ direction of the camera I guess? I'm sure I'll figure it out.

Thank you.

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Touch input.
« Reply #5 on: June 04, 2013, 02:59:59 PM »
Hi,

 ah yes, that needs some update for Unity 4. I'll work on that.

bye,

 Jean