playMaker

Author Topic: Input touches for playmaker package available  (Read 29730 times)

gamedivision

  • Full Member
  • ***
  • Posts: 227
Re: Input touches for playmaker package available
« Reply #15 on: January 09, 2013, 10:45:03 AM »
Think I've sorted it,I didn't realise you had to run a global event as well

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Input touches for playmaker package available
« Reply #16 on: January 09, 2013, 01:45:28 PM »
Hi,

 It definitly works here, I think you misunderstand the use of them action. They use the last recorded gesture, or tap, which means it only make sense to use these actions when a Input touch event has been fired.

Create a state with a global transition set to "INPUT TOUCHES / ON" in that state, use the action "Input Touches Get Position" and make sure you have ticked "on" in the bridge. That will be working then.

This bridge is working using event data, so events fired by this playmaker bridge carry in a way the information, only that it's not stored in the event data itself but inside the bridge, but the principle is there.

So following this principle, it's always important to get the information you want from a particular event as soon as you receive it, else another event might be fired that will overwrite the data.

bye,

 Jean

 bye,

 Jean

 

gamedivision

  • Full Member
  • ***
  • Posts: 227
Re: Input touches for playmaker package available
« Reply #17 on: January 09, 2013, 02:11:46 PM »
yeah i hadn't created the event,
now i created the event and it stores the touch position in a vector 2 using Input Touches Get Position,
then on another FSM i have the Vector2 to Vector3 then a set position using the converted vector 3 but for some strange reason my touch is off the screen

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Input touches for playmaker package available
« Reply #18 on: January 09, 2013, 02:21:37 PM »
hi,

 Position in space are not position in 2d screens, it's a different "world" all together. The only way to match screen pos and world pos, is either to fit the world units necessary to cover the screensize in the camera field of view. so for ipad if you have 1024 pixel in width, you need to have your camera to view at least 1024 unit in width.

 else, you need to work it out using my action that transform a screen position onto a plane in the 3d world, ( search for "drag" on this forum, lot'ss of example on how to convert a screen pos into a world pos.

bye,

 Jean

gamedivision

  • Full Member
  • ***
  • Posts: 227
Re: Input touches for playmaker package available
« Reply #19 on: January 09, 2013, 02:22:05 PM »

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Input touches for playmaker package available
« Reply #20 on: January 09, 2013, 02:33:29 PM »
Hi,

 Couls you explain what we should look for?

what do you want to do with the touch position? that's the question I guess.

bye,

 Jean

gamedivision

  • Full Member
  • ***
  • Posts: 227
Re: Input touches for playmaker package available
« Reply #21 on: January 09, 2013, 02:35:09 PM »
its not moving within the camera space,when i move my finger around the ipad screen its way off the camera view

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Input touches for playmaker package available
« Reply #22 on: January 09, 2013, 02:40:14 PM »
Hi,

 yes, but what do you want to do with the touch position? do you want to drag something around in the world? do you want to have a gui texture or a 2d element following the touch?

bye,

 Jean

gamedivision

  • Full Member
  • ***
  • Posts: 227
Re: Input touches for playmaker package available
« Reply #23 on: January 09, 2013, 03:44:39 PM »
no its going to be used for slashing objects,I'm going to add a ray cast on finger down that follows the finger position,then detect when the ray cast hits an object,which will set off the slice of that object

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Input touches for playmaker package available
« Reply #24 on: January 10, 2013, 03:19:45 AM »
Hi,

 Yes in your case, you will need a special custom action to ray cast from a screen pos. the drag system I did will not do that as is.

 Get back to me in few days if you haven't heard back from me.

bye,

 Jean

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Input touches for playmaker package available
« Reply #25 on: January 11, 2013, 02:01:20 AM »

gamedivision

  • Full Member
  • ***
  • Posts: 227
Re: Input touches for playmaker package available
« Reply #26 on: January 11, 2013, 04:15:46 AM »
Wow thank you jean can't wait to finish work and check it out  ;D

Martin

  • Playmaker Newbie
  • *
  • Posts: 4
Re: Input touches for playmaker package available
« Reply #27 on: February 27, 2013, 12:23:23 PM »
Input Touches 'Down', 'On' , 'Up' does not appear in the events menu. Are they supported?

- Unity 4.0.1f2
- Playmaker  1.5.3
- Input.Touches 1.1.3
- Playmaker Input Touches (https://hutonggames.fogbugz.com/default.asp?W961)

I tried with a new project only importing Playmaker and Input Touches, same issue.



jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Input touches for playmaker package available
« Reply #28 on: February 28, 2013, 02:12:53 AM »
Hi,

Can you double check something:

1: instead of choosing "custom events" go to the "global events", and there you should have it listed. The "custom events" I think only list the one used or something.

2: if (1) doesn't work:

 go to the "PlayMakerInputTouchesProxy" gameObject that should be in your scene as a prefab.

 go to the event tab.

do you see "INPUT TOUCHES / ON" and the one that are missing? if yes are they ticked as global? if not, then tick them on.

bye,

 Jean

Martin

  • Playmaker Newbie
  • *
  • Posts: 4
Re: Input touches for playmaker package available
« Reply #29 on: February 28, 2013, 11:18:06 AM »
- Only 'Down' is listed in the the Global Event menu.

- 'Down', 'On' , 'Up' are not listed in the events of the "PlayMakerInputTouchesProxy" gameObject.