Dragging Clip Object with the Mouse

Hi

Im looking to adjust the "Hello World" demo .as script so that the clips can be dragged with the mouse (as with the Stacked Box example.

Anyone able to provide any pointers?
Have a look at b2MouseJoint.

All the code for the TestBed examples are included in the download, the mousejoint functionality is implemented in the Test.as class (found in the TestBed folder).
Quote:
Hi

Im looking to adjust the "Hello World" demo .as script so that the clips can be dragged with the mouse (as with the Stacked Box example.

Anyone able to provide any pointers?


try modding the bridge example and take out the bridge...

have a look at example post... http://www.clarklin.net

my problem tho is when i drag and release the mouse, if the object is not touching the mouse the joint remains there... its not quite right..something is not working properly. also, is there a way to restrict the allowable distance for the object away from the mouse once the mouse is pressed in. does anyone know what is wrong with my version, because my class arent exactly defined like the example..



thanks.
Clark
I can't tell what is wrong from the swf, but I'm sure there is some problem 🙂 It's laggy too, which it shouldn't be with a single dynamic object... I would have to see code to know what you did.

Original thread: https://box2d.org/forum/viewtopic.php?t=357