Value CreateFixture(VM &vm, b2Body &body, b2Shape &shape) { auto fixture = body.CreateFixture(&shape, 1.0f); auto po = new PhysicsObject(Renderable("color"), fixture); fixture->SetUserData(po); return Value(vm.NewResource(po, &physics_type)); }