I make simple example in IOS 9.0.
void ofApp::draw(){
ofCircle(pos.x,pos.y,200,200);
}
//--------------------------------------------------------------
void ofApp::touchDown(ofTouchEventArgs & touch){
pos.set(touch.x,touch.y);
}
//--------------------------------------------------------------
void ofApp::touchMoved(ofTouchEventArgs & touch){
pos.set(touch.x,touch.y);
}
when i run this on my ipad and iphone.When i touch the screen,the circle is not in the center.It will offset,espacially near the edge of the screen.And when the circle size get bigger,it will offset more,It’s very strange?
When I use
float w = 400;
ofDrawRectangle(pos.x - w/2,pos.y - w/2,w,w);
the rectangle it’s ok,it will always in the center~