[ODE] Pushing through collisions

Andrew Aye AndrewA at terminalreality.com
Wed Apr 28 19:44:28 MST 2004


What geoms are you using?  I haven't seen this type of behaviour yet - might
be an artifact of your collision detection and contact generation.  Also
curious - how would you compare the two systems from a developers point of
view ( ODE vs Havok ).

 - Andrew Aye


-----Original Message-----
From: Colin Bonstead [mailto:colin at cyan.com]
Sent: Wednesday, April 28, 2004 7:03 PM
To: ode
Subject: Re: [ODE] Pushing through collisions


I'm working on a pretty similar problem.  Our avatar is moved by setting 
the velocities directly (which is the same way we did it when we were 
using Havok).  I know this is "wrong", but it's the only way I've found 
to get the tight, animation synced movement we need.

If I push the avatar into a steep wall, he tends to push into it, and 
rise up some.  If I let him, he would slowly climb up it, but once the 
avatar doesn't have any <45 degree contact normals we assume he's off 
the ground and kill his velocities so he'll fall back down.  
Unfortunately, this results in what I call "wall humping", where the 
avatar sort of bobs up and down a few times per second, as he climbs up 
and into the wall, then drops back down.

Why this didn't happen with Havok, I'm not totally sure.  I'm thinking 
it's because Havok (at least the version we were using, 1.8) doesn't 
allow interpenetrations.  If the avatar pushed into the wall in Havok, 
he would immediately be popped back out that step, whereas ODE seems to 
let the error build up some.  I'm not saying ODE is worse in that 
respect, just that the Havok way worked better for what we were doing.  
(The no interpenetrations thing can be bad too, since if it can't 
resolve a penetration it just stops colliding those objects, ouch.)

Anyway, what I'm trying right now is limiting the velocities I direct 
into static, unclimbable objects.  Each frame I take all the collision 
normals from unclimbable static geometry and add them together, then 
normalize them.  Then I get the vector in between that one, and the 
normalized velocity vector for the avatar.  I use that resulting vector, 
multiplied times the original magnitude of the avatar velocity vector, 
as the velocity of the avatar.  Pretty much the same thing as what 
you're suggesting.  It does make a difference for me, as there's a lot 
less bobbing up and down when I scrape the avatar along a wall.  
However, it didn't totally get rid of the problem for me.  I'll be 
interested to hear any other suggestions people have for solving this 
problem.

Colin

-----Original Message-----
From: Jon Watte <hplus-ode at mindcontrol.org>
Sent: Wed, 28 Apr 2004 16:05:38 -0700
To: ode <ODE at q12.org>
Subject: [ODE] Pushing through collisions

How strong are the collision impulses in ODE supposed to be?
And has anyone had experience with applying actual position
corrections instead of just impulses? (more on this at the
bottom)

Long explanation of the problem I'm seeing:

I have the case where my actor, if I walk it up to a box and
push against the side, will slowly slide into the box. This
started to happen when I gave the actor a force multiplier
while walking slowly, to make it drag its feet less when you
first start walking.

Thus, what happens is that a force of about magnitude 15 is
applied in the center of an upright C-cylinder that's about
1.6 meters tall (plus caps), 0.3 meters radius, and unit mass.
It's pressed against a box that's two meters width and depth
and about half a meter tall, floating in air in front of the
ccylinder. This is enough to slowly push the cylinder into
the box. The box is attached to NULL, and I use a fixed time
step of 0.016667. I allow up to 16 contacts per collision,
although I filter them (however, in this case, only one
contact is generated).

I know that the contacts are detected and generated just fine,
both because I stepped through the code, and because I draw
the contacts as lines on the screen, and they are there just
like you'd expect them to be. Once into the box, I get sucked
in and spit out a side.

I could mail a binary if anyone wanted to look at it, but you
gotta run the DX9.0c beta for it to actually start up :-(


Regarding moving the thing, rather than applying an impulse,
you'll easily get into trouble by tunneling through corners
and stuff if you move the object and it's colliding with a
large number of actors. What I was considering was only
applying a movement if there is a movement direction that's
"out" from all the contacts found, and probably only between
moving objects and the static environment. Has anyone tried
this with ODE, and how did it work?

Cheers,

                        / h+


_______________________________________________
ODE mailing list
ODE at q12.org
http://q12.org/mailman/listinfo/ode




_______________________________________________
ODE mailing list
ODE at q12.org
http://q12.org/mailman/listinfo/ode


More information about the ODE mailing list