ofTouchEventArgs - weird values?


I’m using touchDown, touchMoved, touchUp events.

touch.id, touch.x and touch.y works fine on both iOS and Android.

BUT, I noticed that:

  1. touch.xspeed/ touch.yspeed has weird values: 4.17989e-32 & 7.60177e-37
  2. touch.width/touch.height has weird values: 4.2039e-45 & 1.4013e-45
  3. touch.numTouches has a weird value ONLY IN ANDROID. The value I’m getting is always 1106175736.

The values for (1) and (2) are from iOS but the android values are equally weird.

I don’t even know what’s the meaning of width/height, I was hoping it would give me the delta between the touch began point and the current point without having to store it myself in members.

Any information on this would be appreciated.


that’s all the possible information in a touch, but that doesn’t mean that every device will fill it. in master the arguments are initialized to 0 but in 0.8.4 they are not initialized at all so you get those weird values. i think in both ios and android that info is now meaningless. with and height is supposed to be the with and height of each touch

Helpful as always, @arturo. Thanks.

The concept of having an args struct that contains a member for every possible possible piece of information is understandable, but it makes this struct hard to use on cross platform projects. Perhaps adding “doesHaveSize”, “doesHaveSpeed” flags, etc, is a good idea in this case?