[ODE] Re: 2D simulation

Peter Serocka psero at gmx.de
Thu Nov 6 20:49:34 MST 2003


Hi Lothar:

> 1. In the Readme and in the example code you mention some error
> correcting code ("we need to correct the small angular drift, keep the
> angular velocity and the rotation axis aligned to the z-axis"). Is
> this recommended?

Yes, strongly. If you watch the 3d ode coords over some
time you will see. In a 2d projection, it seems ok at first sight
but when errors become too large, simulations seems to
behave strange -- because you don't see the full story.
> 

> 2. For the jump'n'run, I need some "special" boxes. Imagine the hero
> is a box, and jumps on a mountainside - the box would spin and lay
> flat on the ground, maybe even slide down the mountainside, depending
> on the type of surface. But the hero should not fall down when jumping
> on a mountainside! So how can I suppress the spinning of the box? Or
> what else can I do?

So the box is supposed only to move up and down (x/y axis)
but not to rotate around z? This needs a similar, new constraint type.

An alternative might be: build a slider (along x) connecting
the box object and the 'world'. Gives you 1D translation, no rotation.
Connect a second object to the first one with a second slider (along y):
voila: 2D translation, no rotation.

Drawbacks: a) first object is a helper object (should have low mass,
no collision), b) found slow performance (in ode 0.035) with
many objects of that kind. 

But it may be worth a try.

Peter

-- 
NEU FÜR ALLE - GMX MediaCenter - für Fotos, Musik, Dateien...
Fotoalbum, File Sharing, MMS, Multimedia-Gruß, GMX FotoService

Jetzt kostenlos anmelden unter http://www.gmx.net

+++ GMX - die erste Adresse für Mail, Message, More! +++



More information about the ODE mailing list