[ODE] Pushing an object.

Thomas Paviot thomas.paviot at free.fr
Mon Jan 2 09:03:08 MST 2006


Hello and happy new year,

Maybe the stability problem comes from the fact that you set linear 
velocity of the reel. Did you try to add a force proportional to the 
difference between the reel's position and the mouse cursor's position 
(like a linear spring)?

The motion control can be easily achived if the trajectory is simple : 
if it's a line, you can use a slider joint; if it's a circle you can use 
an hinge joint. If the trajectory if more complex (but remains in a 
plane), it's possible to constraint the POR of the reel with the 
trajectory using a speed and/or force control. ODE doesn't provide such 
a joint but you can create a new one.

Thomas

>Happy New Year !
>
>I'm having trouble with a "drag and drop" sort of situation.
>If you look at this picture
>http://www.btinternet.com/~Peter.Onion/E803/Drawers.jpg
>you can see what I'm working on.
>
>The two pink objects represent reels of paper tape.  When I press the
>mouse over a reel I want to be able to drag it to a different position,
>and while it is moving it will push other reels out of the way.
>
>This mostly works, except for very small reels that become unstable
>while being dragged.
>
>To move the reels I'm setting the reels linear velocity proportional to
>the difference between the reel's position a the mouse cursor's position
>(mapped onto the surface in the 3d space).
>
>Should be using some sort of joint to control the reels motion ?
>Another idea I had was to create some sort of invisible object at the
>mouse cursor position and use that to push objects around using the
>normal collision detection techniques.
>
>Peter  
>  
>


More information about the ODE mailing list