I’m confused about ofxBox2dBaseShape::setPosition(float x, float y).
Is this method going to set polygon’s center to desired point?
Here is my code that how I used this method:
ofVec2f personOrigin = persons[nPressedPersonIndex]->getOrigin(); triangles[nPressedPersonIndex].get()->setPosition(personOrigin); ofVec2f point = triangles[nPressedPersonIndex]->getPosition();
However, the value of “point” is different from the value of “personOrigin”.
That is, like, I want to set the position of a polygon to (567, 56), but it goes to (1654, 589).
If this method is not used to set polygon’s center to desired position, how can I change my polygon’s position?