We are about to switch to a new forum software. Until then we have removed the registration on this forum.
Everything works using the Processing and also when brought into IntelliJ (with minor changes involving floats). The code is buried in a method of a class. Here it is: Boolean hits(float x, float y) { //return true if x,y near center of picture return ((x>padLeft)&&(x<padRight)&&(y>padTop)&&(y<padBot)); } It appears to always return false.
Answers
Format your code
just to make sure the padTop is less than padBot... (processing coords are a bit odd in that 0,0 is top left)
Yes, I am aware of the coordinate system. The code works as a regular Processing sketch, and also when run "in" Java.
This is now working, at least on a desktop. The problem was the synchronous versus asynchronous loading of images. You can kill the chicken: http://faculty.purchase.edu/jeanine.meyer/ProcessingJS/slingshot.html
Now I need help making it work on an iPad. The problem (I think) is getting touch to work.