Re: Interact with a Object
Eike Decker <[email protected]> Sat, 10 Nov 2007 13:43:40 +0100
| Newsgroups | gmane.comp.lib.ode |
|---|---|
| Message-ID | <[email protected]> |
Change the code about your drag & drop code to use addforce in order to change the object's coordinates. It will then have all the information it needs to calculate the velocity. But be aware that this will make your object movement like a rubber band, which means that interaction is less direct. You could also try to set the velocity of the body when changing it's position, but I read that this might create instabilities in your simulation. Calculating the velocity can be done by dividing the difference vector of the movement by the time, if I haven't overlooked something. Eike > Hi, sorry same question! > > when I try to drag my Object with the mouse, it works. But when I > release the Button the Object straight falls to the ground. Also when I > disable Gravity and I try to gave an Object a direction, by drag it > with the mouse -> when I release the Button the Object stops. > > How can I solve this, do I have to calculate the LinearVel or Force? I > thought ODE is calculate that stuff automatically. > > Cheers > > > > > > __________________________________ Ihr erstes Fernweh? Wo gibt es den > schönsten Strand? www.yahoo.de/clever