[ODE] Hovercraft physics inside a tunnel
Christian Weinmüllner
mail at weinmuellner.com
Tue Apr 19 12:01:05 MST 2005
Hello!
I'm currently trying to implement a game physics for a kind of hovercraft
(more precisely: an "antigravity glider") with ODE. Unfortunately I have
several problems with my current implementation, so I'd like to ask you
cracks out there for a little help ;-).
Basically I'm using dBodyApplyForceAtRelPos with four rays (positioned at
the corners of my glider) to apply Forces to or from the ground relative to
the current distance and the current Linear Velocity of my Glider (it is no
problem to post the relevant code if there is need, but I don't want to send
a truckload of stuff with my first mail ;-). This way I made it to "lock up"
my gliders distance to the ground (if using a plane or box) to about +/-
0.02 (which I regard as a pretty big advance, I already had a version with
+/- 6 ;-).
Anyway, as soon as I try this very same physics inside a tunnel (basically a
tube with 50 units in diameter, my glider is about 3x1x1 units in size), the
troubles begin:
- The glider starts to "roll up" the walls like a pendulum, gaining more and
more sideways speed when just left alone. I currently apply a gravity of -9
and no significant linear dampening. Whats the cause for this? Would
dampening help?
- When I drive up the wall (because of my distance "locking", thats pretty
easy), turn to the ground (thus sliding "sideways") and accelerate, my nose
somehow gets stuck into the ground - but even if not, my glider from there
on keeps that strange "helicopter twist" with the nose forward. I checked
the forces I apply, and they are different as I would expect (big on the
front, small on the rear), but somehow the glider wont turn back any more -
any Ideas?
- The game shall once become a racing game, but with my current ODE
implementation, its hard to take up some speed, because the system explodes
very quickly e.g. driving a curve on the inner side (naturally) lets the
glider lift off at some speed, but instead of crashing it spins of to
infinity...
I currently couldn't figure out a way of stabilizing the system enough to
get the speeds I disire (about 60 or 70 units / second). Do you have any
general tips to achieve or at least get closer to that?
I know I am quite vague at the moment, but if you need any more information
to be able to give some sophisticated input, please ask! Thanks in advance
for any input you can provide!
kind regards
Chris
More information about the ODE
mailing list