Re[1]: Re[1]: [ODE] Negative penetration depths
Thomas Harte
thomasharte at lycos.co.uk
Thu Sep 5 11:02:02 2002
This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.
--=_NextPart_Caramail_0063941031248907_ID
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
> Check the direction of movement of the ----- object and you'll know from
> where was that object coming from so you can push it in the opposite
> direction.
>
> I hope this helps
> Raul
That was my original intention - using dBodyGetRelPointVel, but the following was liable
to happen :
- start state : main object is in a valid position
- after 1 time step : points on main object are penetrating a 2 sided object. We know
which side we should push to due to velocity, as you say
- after 2 time steps : main object is still penetrating 2 sided object. But now the
constraint has removed all velocity 'in the direction' of the 2 sided object, and the error
reduction parameter has actually added velocity 'away from' the 2 sided object, meaning
that the main object is now heading in the other direction. So a simple velocity based
solution is fooled.
This is presumably the oscillation problem referred to elsewhere?
A solution I tried was this :
if(object is non-penetrating)
store to last valid velocity;
else
make decisions based on last valid velocity;
But that doesn't work because while an object is penetrating one object, it may run along
a little and start penetrating another. In which case you have to start thinking about
storing last valid velocity per currently penetrated object. And I start thinking that a
solution involving backward stepping (since my simulation is only 1 to 8 islands, each of
around five bodies, and one static environment) and possibly a binary search for a more
accurate penetration time is probably more cost effective.
-Thomas
______________________________________________________
Check out all the latest outrageous email attachments on the Outrageous Email Chart! - http://viral.lycos.co.uk
--=_NextPart_Caramail_0063941031248907_ID--