playMaker

Author Topic: set touch info  (Read 3623 times)

Sjones

  • Full Member
  • ***
  • Posts: 203
set touch info
« on: September 21, 2012, 03:12:27 PM »
this one is a little odd, however its because I am having a problem with get touch info.

The touch info stores the last touch position for that finger.

so If I go back to a state with no touch it will use the last know position.

It wasnt an issue until I had to finish one state with a touch, and then in the following state, I got an interactive element in the exact same place - meaning that it automatically takes the position from the other fsm and uses it in the current fsm even though there is no finger touching.

if possible, an action to set the stored touch position of a finger to null or set a value would be fantastic.

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: set touch info
« Reply #1 on: September 24, 2012, 02:45:31 AM »
Hi,

 you can do that manually without a problem. Simply maintain a flag for example.

Never work with "Get touch info" on a different state then the one you received the global event from or from where you detected a touch. Store the info in variable, and have other fsm and state use the variable you saved it int. Only refer to "Get touch info" where you know it has changed and as soon as it has ( on the state you check for touch events basically)

bye,

 Jean