I have to do a kind of two-dimensional ragdoll for an interactive installation. I’d like to create a class called Person and then have that contain joints and particles for all the limbs. I figured that the easiest way to do this, is to pass an ofxBox2D pointer to the Person-object like this:
this->box2d = box2d;
But for some reason this makes it so the elements from Person aren’t affected by the simulation.
Do any of you why this is so? How would you approach creating a Person-class using elements from ofxBox2D? I’ve looked through the examples, but I can’t find one, where the ofxBox2D-elements aren’t just instantiated in the ofApp.
EDIT: Fixed. Didn’t add parts as shared pointers, now it seems to work.