[ODE] 2D Rectangle Geom??

Aras Pranckevicius nearaz at interamotion.com
Wed Apr 30 02:09:01 2003


> > You can have several problems with boxes: first, when you have several
> > adjacent boxes, you obtain several contacts when the wheel hits the
> > boundary - you'll have to implement merging of these contacts yourself
(or
> > the car will jump slightly on the boundaries).
>
> With a triangle mesh, you have convenient access to exact edges that
> share vertices, which you can use as part of the collision detection
> process. This aids in finding exact solutions for valleys and ridges
> without the need for a separate pass, as in the case of using separate
> geometries.

But you have the same problem if your track is composed of multiple meshes
(like building blocks)... At least that was in my case :) So you have to run
the separate pass of merging contacts that are from different geoms
(different tri-lists).


> which is a plane test clipped along 4 axis-aligned planes. How would you
> define a curved track in your sim? I imagine that you would need to make
> two boxes sorta rotated and offset from each other that intersect and
> produce a nice diagonal line.

Yes, exactly like this.

> If this is the case, I think it would be
> pretty difficult to build a racetrack when worrying about exact
> placement of boxes. This is another area where a tri mesh has an
> advantage, since you can edit your tracks with some 3D editor and write

At first I though so also, but now I'm placing the boxes in "my favourite
editor" over the triangle meshes, and export them. In the track editor, I
joint the "building blocks" to form complete racetrack. Yes, it's an
additional hassle to put the boxes onto the meshes, but this way the
collision is "more stable". I still use tri-meshes for very curved parts of
the road, but for 90% of the rest it's just boxes.


Aras Pranckevicius aka NeARAZ
http://www.gim.ktu.lt/nesnausk/nearaz/