[ODE] Plygonobjects..

Fredrik Sandström dva96fsm at cs.umu.se
Wed Dec 5 04:05:02 2001


On Wed, 5 Dec 2001, simon wrote:

>
> Hi.
>
> Is there any support in ODE for using an arbitrary mesh as an object? Thing
> is I have a planet that people run around (its ofcourse round) blowing
> things up. I'm guessing I can do gravity by recalculating the "gravity"
> every frame and applying it individually to each object. But how do i fare
> when it comes to defining the planet's mesh as a rigid body?
>
You don't want to define the planet as a rigid body as you really only
want the world to interact with the other bodies as a static object (i.e.
the world want move just because a couple of guys starts to jump up and
down =) ), and then only the collision stuff is needed. So what you could
do (since I don't think the arbitrary mesh collision code is implemented
yet...) is to query your planet mesh for the triangle closest beneath the
person and create a corresponding plane that only that articulated chain
collides against. As the person moves about, you change the plane's slope
to always be aligned with the underlying planet mesh. This will give
approximately the same effect as if the whole triangulated mesh was indeed
beeing used as a collision model.

Good luck with your game...

/Fredde

Magic is Life - Technology is Death