![]() | motionPressure |
|
06 Jan 2013, 06:13
steve daniels (1 post) |
Just started with book today (Jan 6 , 2013), seems you are aware of this, but for other readers motionPressure no longer support in P2b7. This breaks many examples in Chapter 2, minor frustration so early on—especially since this is such a great resource. Based on one of the chapter footnotes and this link - can get functionality back with mod to mousePressed() (or other mouse calls)
void mousePressed() {
println( "pressed x: " + mouseX + " y: " + mouseY);
// add folowing lines
MotionEvent me = (MotionEvent) mouseEvent.getNative();
float mPres = me.getPressure();
println (mPres); // can do stuff with this float now -- mine ranges .4 - 3.6 -- not 0 -1
}
|
|
08 Jan 2013, 08:05
James Clark (1 post) |
Ah, thanks for this, I was wondering what I had missed. There are a few of other things to get the 2.2 example working:
|
|
19 Mar 2013, 19:51
Daniel Sauter (38 posts) |
Thanks for posting this fix. |
| You must be logged in to comment |

