Skip to content

Commit

Permalink
Update ofxBox2dBaseShape.cpp
Browse files Browse the repository at this point in the history
Added setRotation function
  • Loading branch information
julianadenauer committed Jul 10, 2013
1 parent fccfb0b commit 57fd544
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions addon/ofxBox2d/src/ofxBox2dBaseShape.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,10 @@ float ofxBox2dBaseShape::getRotation() {
else return 0;
}

void ofxBox2dBaseShape::setRotation(float angle){
body->SetTransform(body->GetPosition(), DEG_TO_RAD * angle);
}


//------------------------------------------------
void ofxBox2dBaseShape::setPosition(float x, float y) {
Expand Down

0 comments on commit 57fd544

Please sign in to comment.