[ODE] ode & swept collision

Jan jan at rpgfan.demon.co.uk
Mon Sep 1 02:28:01 2003


This is a multi-part message in MIME format.

------=_NextPart_000_0005_01C37073.FE7A3E40
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Anyone have any tips on what's the best way to use swept collision with
ode?

I've got ode working really well using opcode. Now I'd like to use my
own collision code to collide against the game's background trimesh.
I've read the ode manual, and I understand how to do this.=20

There is one problem (bear with me) - all ode's collision relies on
intersection test and pushing intersecting geometries out of eachother,
but my game's collision uses swept-sphere tests. In order for the
swept-sphere to work, the spheres aren't allowed to intersect with the
landscape at all. Instead of moving them into the landscape the
swept-sphere function will return the time of impact and it uses that =
to
determine the new position for the sphere.

I could program this by clipping the movement of the colliding sphere
against the trimesh, and then setting the intersection depth to 0, so
that no ERP force will be applied (it won't be needed).

I'm just not 100% sure where (at what point in the code) I should clip
the object's position, and wether it would throw up any problems. After
all I'd be overriding the position.

I hope someone can understand this explanation =3D)

So again, any tips on what's the best way to use swept collision with
ode?

T.i.a. guys

--

Jan


------=_NextPart_000_0005_01C37073.FE7A3E40
Content-Type: text/html;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>

<META content=3D"MSHTML 6.00.2800.1226" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT size=3D2>
<P>Anyone have any tips on what's the best way to use swept collision =
with=20
ode?</P>
<P>I've got ode working really well using opcode. Now I'd like to use =
my own=20
collision code to collide against the game's background trimesh. I've =
read the=20
ode manual, and I understand how to do this. </P>
<P>There is one problem (bear with me) - all ode's collision relies on=20
intersection test and pushing intersecting geometries out of eachother, =
but my=20
game's collision uses swept-sphere tests. In order for the swept-sphere =
to work,=20
the spheres aren't allowed to intersect with the landscape at all. =
Instead of=20
moving them into the landscape the swept-sphere function will return =
the time of=20
impact and it uses that to determine the new position for the =
sphere.</P>
<P>I could program this by clipping the movement of the colliding =
sphere against=20
the trimesh, and then setting the intersection depth to 0, so that no =
ERP force=20
will be applied (it won't be needed).</P>
<P>I'm just not 100% sure where (at what point in the code) I should =
clip the=20
object's position, and wether it would throw up any problems. After all =
I'd be=20
overriding the position.</P>
<P>I hope someone can understand this explanation =3D)</P>
<P></P>
<P>So again, any tips on what's the best way to use swept collision =
with=20
ode?</P>
<P>T.i.a. guys</P>
<P>--</P>
<P>Jan</P></FONT></DIV></BODY></HTML>

------=_NextPart_000_0005_01C37073.FE7A3E40--