[ODE] Weird collision/force problem

Clay Fowler claytonious at cox.net
Mon Nov 11 18:02:02 2002


This is a multi-part message in MIME format.

------=_NextPart_000_0067_01C289AC.51C413A0
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Hello, everyone.

I have a problem with forces being applied to my rigid body. My =
vehicle's "front" is along the positive Y-Axis, its "right" is along the =
positive X-axis and it's "up" is positive-Z. When I call =
dBodyAddForceAtPoint() with a force vector of 0,0,1 ("straight up"), =
specifying the rear-right of the vehicle as the point (so it's, for =
example, an X of 1 and a Y of -1), for some reason the FRONT LEFT of the =
vehicle gets pushed up into the air. This is the opposite corner of the =
point I am specifying! When I swap the coordinates and apply an upward =
force at the point (-1,1), the REAR RIGHT of the vehicle gets pushed up. =
I have verified that ODE and my app both have the same idea of what the =
world coordinate axes are by applying forces to the center of mass to =
move the vehicle along the world's X, Y, and Z axes and these all behave =
exactly as I would expect. But when I apply a force at a point, it seems =
like the point I'm passing is "mirrored" on the axes. I am specifying =
the mass of the vehicle with a simple dMassSetBox() and I have visually =
verified that the box is a very good fit to the vehicle. Any ideas on =
why the axes are "mirrored" this way for applying forces?

The reason this is such a big problem is because I am doing my own =
collision detection with the terrain beneath the vehicle by creating my =
own Contact joints where the vehicle touches the terrain. Of course, the =
vehicle responds incorrectly to these points because of the mirroring =
problem.

Thanks for any help!

- Clay


------=_NextPart_000_0067_01C289AC.51C413A0
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 http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2719.2200" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>Hello, everyone.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>I have a problem with forces being =
applied to my=20
rigid body. My vehicle's "front" is along the positive Y-Axis, its =
"right" is=20
along the positive X-axis and it's "up" is positive-Z. When I call=20
dBodyAddForceAtPoint() with a force vector of 0,0,1 ("straight up"), =
specifying=20
the rear-right of the vehicle as the point (so it's, for example, an X =
of 1 and=20
a Y of -1), for some reason the FRONT LEFT of the vehicle gets pushed up =
into=20
the air. This is the opposite corner of the point I am specifying! When =
I swap=20
the coordinates and apply an upward force at the point (-1,1), the REAR =
RIGHT of=20
the vehicle gets pushed up. I have verified that ODE and my app both =
have the=20
same idea of what the world coordinate axes are by applying forces to =
the center=20
of mass to move the vehicle along the world's X, Y, and Z axes and these =
all=20
behave exactly as I would expect. But when I apply a force at a point, =
it seems=20
like the point I'm passing is "mirrored" on the axes. I am specifying =
the mass=20
of the vehicle with a simple dMassSetBox() and I have visually verified =
that the=20
box is a very good fit to the vehicle. Any ideas on why the axes are =
"mirrored"=20
this way for applying forces?</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>The reason this is such a big problem =
is because I=20
am doing my own collision detection with the terrain beneath the vehicle =
by=20
creating my own Contact joints where the vehicle touches the terrain. Of =
course,=20
the vehicle responds incorrectly to these points because of the =
mirroring=20
problem.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Thanks for any help!</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>- Clay</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV></BODY></HTML>

------=_NextPart_000_0067_01C289AC.51C413A0--