This is a physics sandbox idea, using the debugDraw from the demo projects. You can draw circles, triangles, rectangles and lines. Additionally lines create joints in the following:
a single line will freeze an object in place
crossed lines will make a revolving joint. If this is inside one object that object will rotate around a pinned spot, if it is inside two objects it is a free floating joint between those objects
three lines like an upper case I create a rope joint. If the crosses are in objects they are free floating, otherwise they are fixed in space
The code is very messy and could do with a lot of refactoring, I was surprised how much of a headache turning drawn lines into primitive shapes was to do, this is all implemented in the “drawnObject” class.
Screen controls, the button bottom middle pauses and resumes, the clear button clears. The other button, bottom right switches between draw mode (arrow left) and drag objects mode (arrow right). This needs proper icons, but I was just using the ones out of cargobot…
No code yet as the forum doesn’t seem to like me… it’s too long for a post, what’s the easiest way for me to put it up?
.@Jmv38 it should work, FPSReporter is not included in the gist so you’ll have to comment out the use of the “myFPSReporter” variable (used in Main in the setup() function, and at the end of the draw() function.)
I’ve tweaked the gist code to remove the FPSReporter (I import this from a seperate project to keep an eye on performance). I’ve also adjusted my todo’s a little and will hopefully get back onto this shortly.
My plan is to do my first couple of todos around touch handling (being able to touch lines/small objects) and improve shape detection, mainly around the fact you can’t create thin rectangles.
Then I’m going to do some heavy refactoring, as the code has got quite messy and I need to clean it up before I can come up with new things to add.
I’m interested in any ideas people have for features to add beyond that, things I can add to my todo list.
Well it might just be an ipad2,4 but I don’t know I just know once I deleted it , it worked the only way to less is that I realized you could delete and leave 3 lines of the comments in a row
Ex.