Hi,
Instead of creating a new body type, you can in fact use the settings of
the generated contact instead. You'll need to add a bit of extra code
for the "motionN" part of the contact joint (see a previous post on this).
Using motion1 and motion2, you can specify the velocity of the "world"
at the given point along fdir1 and fdir2. Using the motionN addition to
the contact joint, you can then specify the motion along the normal of
the contact.
Therefore, given any mutable body with a linear and angular velocity,
you can calculate the velocity of the contact point and put these 3
values in. Note that the contact doesn't actually need any angular
velocity information - all the angular velocity does is add to the
contact point's linear velocity, depending on the distance the point is
from the "centre of mass" of the mutable body.
I've implemented this for both a lift and a pendulum just a week or so
ago, and it works perfectly.
Geoff
Yordan Gyurchev wrote:
>I raised the question about bodies that are not dynamic bodies but have
>physical presence and properties.
>>So far Geoff answered to that (thanks Geoff your answer on the PS2 stuff was
>most helpful) - putting just simple geoms that are moved from outside "game"
>code.
>>Unfortunately I think just simple bodyless geom won't suffice. Why? Mutable
>bodies are supposed to interact with other physical dynamic or mutable
>bodies. During these interactions and physical solutions the system needs
>more information about the mutable body (angular and linear velocity is
>must) in order to create proper physical response.
>>Imagine a animated moving platform that has some boxes on it... if you
>don't what the boxes to slowly slide off the platform... the platform needs
>to be updated not only with proper position and orientation but also linear
>and angular velocities (easily derivable from animation).
>>In our last modified version of ode we had mutable bodies put in. Now that
>I'm trying to move to ode-0.5 I have to redo the work again.
>>I imagine that most games need these kind of bodies and probably will be a
>nice addition to the ODE library.
>>Is this the right forum to discuss this or there is an alternative forum for
>dev stuff?
>>-Yordan
>>>>>>>_______________________________________________
>ODE mailing list
>ODE at q12.org>http://q12.org/mailman/listinfo/ode>>>>