vanderlin/ofxBox2d — Issue #21: setposition() on ofxBox2dPolygon, it is effective in term of collision but not graphically
Author: LimeJuice
Created: 2012-01-21 15:12:09+00:00
State: open

Hi, I want to move Polygons I created, they are in a vector.
I use this code :

int x = 0;
int y = 1;

for (int i = 0 ; i < _Poly.size() ; i++) {

ofPoint _Point;
_Point = _Poly[i].ofxBox2dBaseShape::getPosition();
_Point.x = _Point.x+ x;
_Point.y = _Point.y+ y;
_Poly[i].setPosition( _Point.x, _Point.y);

}

The result is that objects around react as if polygons are moving but graphically, polygons are display at the same place.

PS: I am using ofxBox2dBaseShape::getPosition() as ofxBox2dPolydon::getPosition() is empty