[ODE] Collision problem
Aurélien ....
kinju59 at gmail.com
Sun Dec 11 05:00:10 MST 2005
Hi all,
I have a probleme with collisions:
const int N = 10;
dContact contact[N];
int n = dCollide (_kart->GetGeomID(),_ground->GetGeomID(), N,
&contact[0].geom,sizeof(dContact));
if (n > 0)
{
for (int i = 0; i < n; i++)
{
contact[i].surface.mode = dContactSlip1 | dContactSlip2 |
dContactSoftERP | dContactSoftCFM | dContactApprox1;
contact[i].surface.mu = dInfinity;
contact[i].surface.slip1 = 0.1;
contact[i].surface.slip2 = 0.1;
contact[i].surface.soft_erp = 0.5;
contact[i].surface.soft_cfm = 0.3;
dJointID c = dJointCreateContact (ODE::GetInstance()->GetWorldID(),
_contactgroup, &contact[i]);
dJointAttach (c, dGeomGetBody(contact[i].geom.g1),
dGeomGetBody(contact[i].geom.g2));
}
}
the variable n is never > 0...
What I have missed again?
Thanks all ;)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://q12.org/pipermail/ode/attachments/20051211/d38b1ad2/attachment.htm
More information about the ODE
mailing list