Hi
I'm add this to a wrapper but it's doesn't working ... there is no "type" member it saying ... but in box2d documentation it written that this shoud work :/ (def.type = b2_kinematicBody;)
anybody could help ??
regards
FUNCTION b_CreateKinematicPoly_ext: x, y, friction, pts[]
INLINE
b2BodyDef def;
def.type = b2_kinematicBody;
def.position.Set((float)x, (float)y);
b2Body* kinematic = bWorld->CreateBody(&def);
b2PolygonDef kinematicshapedef;
kinematicshapedef.vertexCount = LEN(pts);
for(int i=0; i<LEN(pts); ++i)
{
kinematicshapedef.vertices[i] = b2Vec2(pts(i,0), pts(i,1));
}
kinematicshapedef.friction = friction;
kinematic->CreateShape(&kinematicshapedef);
return b_NewObject(kinematic,bBody);
ENDINLINE
ENDFUNCTION
Maybe our box2d source is too old?
Yes it is :)
Thanks