[ODE] Pushing an object.
Peter.Onion at btinternet.com
Mon Jan 2 06:54:53 MST 2006
Happy New Year !
I'm having trouble with a "drag and drop" sort of situation.
If you look at this picture
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.
More information about the ODE