[ODE] ODE freezes, can you help?
Ivan Bolcina
ivan.bolcina at volja.net
Mon Dec 16 14:34:03 2002
This is a multi-part message in MIME format.
------=_NextPart_000_0045_01C2A553.30831200
Content-Type: text/plain;
charset="iso-8859-2"
Content-Transfer-Encoding: quoted-printable
Hi. I create "dJointCreateContact" by hand. Sometimes works just fine, =
sometimes it crashes application. Am I initializing structures wrongly? =
Or what??
dContact contact; //contact
contact.surface.mode =3D dContactBounce; //bounce??
contact.surface.mu =3D 1; // ???
contact.surface.bounce =3D 0.5f; //????
contact.surface.bounce_vel =3D 0.1f;/????
convertVector(diff,contact.geom.normal); // copy DirectX D3DXVECTOR3 to =
dVector3, normal
convertVector(m_Position-diff,contact.geom.pos); //copy DirectX =
D3DXVECTOR3 to dVector3,position
D3DXVECTOR3 spe=3Dmove-tmp->move; //approximal depth calculation
len=3DD3DXVec3Length(&spe);
len*=3Dapp->getElapsedTime();
contact.geom.depth=3D5+len;
contact.geom.g1=3Dthis->PhyGeom; // assign Geom of first body
contact.geom.g2=3Dtmp->PhyGeom; //assign Geom of second body
dJointID c =3D dJointCreateContact =
(app->world,app->contactgroup,&contact); // create join
dJointAttach (c,this->PhyBody,tmp->PhyBody); // add it
------=_NextPart_000_0045_01C2A553.30831200
Content-Type: text/html;
charset="iso-8859-2"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-2">
<META content=3D"MSHTML 6.00.2800.1106" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV>
<DIV><FONT size=3D2>
<P>Hi. I create "dJointCreateContact" by hand. Sometimes works =
just fine,=20
sometimes it crashes application. Am I initializing structures wrongly? =
Or=20
what??</P>
<P> </P>
<P><FONT face=3D"Courier New">dContact contact; =20
//contact<BR></FONT><FONT=20
face=3D"Courier New">contact.surface.mode =3D dContactBounce;=20
//bounce??<BR></FONT></FONT><FONT size=3D2><FONT=20
face=3D"Courier New">contact.surface.mu =3D 1; =
=20
// ???<BR></FONT><FONT face=3D"Courier New">contact.surface.bounce =3D=20
0.5f; //????<BR></FONT><FONT=20
face=3D"Courier New">contact.surface.bounce_vel =3D =
0.1f;/????<BR></FONT><FONT=20
face=3D"Courier New">convertVector(diff,contact.geom.normal); // =
copy=20
DirectX D3DXVECTOR3 to dVector3, normal<BR></FONT><FONT=20
face=3D"Courier =
New">convertVector(m_Position-diff,contact.geom.pos); =20
//copy DirectX D3DXVECTOR3 to dVector3,position<BR></FONT><FONT=20
face=3D"Courier New">D3DXVECTOR3 spe=3Dmove-tmp->move; //approximal =
depth=20
calculation<BR></FONT><FONT=20
face=3D"Courier New">len=3DD3DXVec3Length(&spe);<BR></FONT><FONT=20
face=3D"Courier New">len*=3Dapp->getElapsedTime();<BR></FONT><FONT=20
face=3D"Courier New">contact.geom.depth=3D5+len;<BR></FONT><FONT=20
face=3D"Courier New">contact.geom.g1=3D</FONT></FONT><FONT =
face=3D"Courier New"=20
color=3D#0000ff size=3D2>this</FONT><FONT size=3D2><FONT=20
face=3D"Courier New">->PhyGeom; =
// assign=20
Geom of first body<BR></FONT><FONT=20
face=3D"Courier =
New">contact.geom.g2=3Dtmp->PhyGeom; //assign=20
Geom of second body<BR></FONT><FONT face=3D"Courier New">dJointID c =3D=20
dJointCreateContact=20
(app->world,app->contactgroup,&contact); // =
create=20
join<BR></FONT><FONT face=3D"Courier New">dJointAttach =
(c,</FONT></FONT><FONT=20
face=3D"Courier New"><FONT color=3D#0000ff size=3D2>this</FONT><FONT=20
size=3D2>->PhyBody,tmp->PhyBody); =
//=20
add it</P></FONT></FONT></DIV></DIV></BODY></HTML>
------=_NextPart_000_0045_01C2A553.30831200--