[ODE] bouncy car
Luke Kenneth Casson Leighton
lkcl at lkcl.net
Mon Nov 8 18:34:34 MST 2004
On Mon, Nov 08, 2004 at 09:17:40AM -0800, Jon Watte wrote:
>
> > 1) the design of the ode library critically depends on OpenGL.
>
> In no way does ODE depend on OpenGL. I've written ODE applications
> that only link against Direct3D9 in C++. I've even written an ODE
> application that only links against MANAGED Direct3D9.
great! my misunderstanding then.
> > in the case of libode, that would mean making setCamera, setColor,
> > setTransform, drawBox etc. all part of an "external" OpenGL-specific
> > library which libode would use.
>
> Did you actually look at the code
yes.
> and the factoring? Did you notice
> that those functions are actually part of an external OpenGL specific
> library?
no.
> Did you read the documentation,
yes.
> which mentions integrating
> with other graphic libraries,
missed that.
> and explicitly does not document the
> separate "drawstuff" library?
i had not consciously noticed the specific lack, instead went to
examine code.
> > 2) i was surprised to find that hinges do not have a means for
> > developers to apply forces or torques "via" the hinge.
>
> > what i mean by that is that in order to implement a spring,
> > the developer must MANUALLY calculate the direction of the forces
> > on the objects.
>
> Did you look at the joint stop settings, as described in the
> documentation?
yes....
> Did you look at the StopERP and StopCFM functions to
> set the solver constants for the case where you're outside the stop?
but i do not yet understand them enough / have enough confidence /
initiative to try them without being prompted...
... but i will now try them at your recommendation.
i noticed that something called ERP and CFM are used on Hinge2
in the test_buggy.cpp example but it had not occurred to me
to use StopERP and StopCFM to achieve "spring" suspension.
or, rather, it _had_ but i did not from there make the leap /
connection to StopERP and StopCFM.
what i have at present is a bit messy because i am applying forces
"manually". yes, definitely i'll try those and let you know what
happens.
> Did you consider the ability to set the low and the high stop to the
> same value to "enforce" a specific angle?
yes and i am using that already - it works well.
> I agree that there's a
> small design bug here, in that setting a Low higher than a High
> will get ignored, so you have to be careful about the order you set
> the constraints in.
oh right thanks for the heads up in advance.
> > 1) does anyone know of any good open source "landscape" creating code?
> > blank space is really boring and deceptive.
>
> http://www.mindcontrol.org/~hplus/carworld/
GREAT. thank you.
> > 2) can someone advise me what functions i should call to work out a
> > vector pointing up at right angles to a surface on the "car"?
>
> What is the surface of the car? Are you saying the surface the car
> is resting on? If so, the contact normal for each of the wheels would
> be what you want. If you want the actual orientation of the car, the
> body orientation matrix contains the right, up and back vectors because
> every orientation matrix is also a basis.
>
> > i need to apply a speed-related downforce onto the car of course but
> > i am presently applying it in the z-direction only.
>
> So that means car-relative up.
yes. which is not ideal if the car is going up a hill!!
i want to be able to apply windspeed force to the *sides* of
the car body.
not sure what i'm going to do about the underside though -
heck i may just assume perfect aerodynamics and apply a
force anyway, which will, if the car is tipped nose-forward
(arse in air and still going forwards) be applied downwards
and backwards.
> Now, go read the documentation (version 0.5) from start to end before
> you come back and criticize the library for faults it most definitely
> does not have.
typically i dive in, play, read, look up, fail to make connections,
play some more, read, look up, still can't make connections, play some
more, give up and go find someone to talk to.
> I'd be OK if you criticized it for faults it DOES have.
ack!
> Cheers,
>
> / h+
>
--
--
you don't have to BE MAD | this space | my brother wanted to join mensa,
to work, but IT HELPS | for rent | for an ego trip - and get kicked
you feel better! I AM | can pay cash | out for a even bigger one.
--
More information about the ODE
mailing list