Editor software for physics with joints support

Hello,

I would like to ask if you know about some software that supports creating complex physics bodies f.e. a car that would consist of several physics bodies connected together with joints or a ragdoll body etc.

I would like to try to play with this a bit but I find it painfull to do it only in code.

I use PhysicsEditor but it doesnt support joints…

Thank you for any tips!

I don’t know if you just want to edit the action, or do you need an action that can provide physical feedback?

If it is the former, I use Spine 2d.

You can make the animation actions of the objects in advance, and then perform different actions in the condition you set.

Thank you for your reply.

I know Spine and it is great tool for animation.

However, I want for example create a car that has physical body with its wheels as physical bodies joined trought pivot joint and make it all moving “on its own” in physics box2d enviroment.

I would like an editor that lets me place everything and join it together with joints so I dont have to create this model in code only…

So far it appears that I have to write my own editor that could be run in simulator :frowning: .

Sorry for not being able to help. :sob:

If follow what you said, the easy way I know so far can only be easily achieved in a 3D editor like unity.

2D should only be written step by step, good luck.

@atanasovskyjiri

I can’t think of a pre-made solution for your problem but I’ll walk you through a simple technique I’ve used.

  1. Create your objects and add code to make them draggable
  2. Drag the object to your desired location (drag a rectangle and circles to “draw” a car shape)
  3. Export or reference the coordinates of all of the objects
  4. Use the objects’ coordinates to make physics joints

Drag code below - I just grabbed it from a project so it is untested but can serve a s reference

           object.isDragging = false
           function object:drag( e )
			    if "began" == e.phase and self.isDragging == false then
			        self.isDragging = true
			        self.dragStartX = e.x ; self.dragStartY = e.y
			    elseif "moved" == e.phase and self.isDragging == true then
			       local deltaX = e.x - self.dragStartX
			       local deltaY = e.y - self.dragStartY
			       self.x = self.x + deltaX
			       self.y = self.y + deltaY
			       self.dragStartX = e.x ; self.dragStartY = e.y
			    elseif "ended" == e.phase or "cancelled" == e.phase then
			        self.isDragging = false
			        self.dragStartX = nil ; self.dragStartY = nil
			    end
			    return true -- stop further propagation of touch event!
			end
            object:addEventListener( "touch" )
2 Likes

I just noticed this was missing so it is not the top line of the code

Thank you for reply and code sample.

I can create some kind of “editor” that lets me move bodies, join them with joints and export it as json. I just asked if you know about/use some commercial supported solution for this.

I quess there is no such thing…