Is Box2D appropriate for restoring force in a system

Hi there !

I'm designing a new project and I wonder whether I should use box2D or make my own physics engine (obviously not at the same level) for my game.

Actually I would have a system made of two circles and a rectangle to 'link' them. (with no force applying on it)
Those two circles would be linked with equal restoring forces.

Another thing is that I would also like to have some 'attract points' which would be points with an attraction force only one those circles (actually one would be the head and the other one the 'feet' and then only one would be attractable by this force).

I know its a bit complicated so that's why I was wondering if I could do such thing with box2D.

Thanks !
You can use Box2D for that sort of thing, but Box2D does not natively offer the sort of thing you want to happen. You'll have to make your own algorithm to do selective attraction stuff, then the times you would need to do the attraction is to use body.ApplyForce on both bodies to do attraction.
Okay. I guess I'll have to use sensors to apply the forces for attract points too…

I wondered if there was something for restoring forces with joints but apparently not.
Anyway I think it would be still better to use box2D in the end.

Thanks.

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