Hi all, just starting out with Box2D, good fun so far though!
I'm attempting to make a little program where a user can drag elements around, and was planning on using Box2D to handle the interaction between the elements (collisions). If you imagine someone dragging around and re-ordering magnets on a fridge, that's pretty much the effect I'm after - where you can drag elements but they stop when you stop dragging.
I'm modifying the HelloWorld example, but I can't figure out how to achieve this effect. Initially I'd assumed I'd have to create a shape to represent the 'fridge door' upon which the magnets would rest, but the few attempts I've had so far didn't work. Next I tried turning off gravity to stop the 'magnets' dropping down to the bottom, with the inevitable consequence that objects keep moving after they're released (d'oh).
Any help/pointer as to how I could go about this appreciated! 😉
I'm attempting to make a little program where a user can drag elements around, and was planning on using Box2D to handle the interaction between the elements (collisions). If you imagine someone dragging around and re-ordering magnets on a fridge, that's pretty much the effect I'm after - where you can drag elements but they stop when you stop dragging.
I'm modifying the HelloWorld example, but I can't figure out how to achieve this effect. Initially I'd assumed I'd have to create a shape to represent the 'fridge door' upon which the magnets would rest, but the few attempts I've had so far didn't work. Next I tried turning off gravity to stop the 'magnets' dropping down to the bottom, with the inevitable consequence that objects keep moving after they're released (d'oh).
Any help/pointer as to how I could go about this appreciated! 😉