Volatile b2RevoluteJoint Box2D

here is my problem, see video: https://www.youtube.com/watch?v=UFXye1mMr04

When the largest body pushes my rope - it becomes crazy. I need to use mousejoint in my game, and the user can grab a large object and click on this rope. If I increase the size of each element of the rope, I can fix it, but I need even fewer size objects in my game. And I need them. I know that box2d does not work very well with small objects, but I see thin ropes in some games and everything works well. Can someone please help me with my problem?

+4
source share
1 answer

Check out RopeJoint at the Box2D test bench. Okay, here's another hint. Turn on the display of joints. See how there is more than just a bunch of revolving joints.

Okay, okay, I’ll explain.

A revolving joint does not have to be the best when handling stretching. You can see how you bother the rope with a huge box in which the first few ropes hang like crazy when they try to fix themselves. They are in distress in this way because great forces and torques are used, and I think that the details of what exactly went wrong are rather difficult to predict, but basically you created a pathological situation for the constraint system.

, , , , , , "", " , , ", , (, , ), ).

, , box2d :

  • , , ( ) , ,
  • A , , , , B - , , A C, ,
  • , A , , , , ... , C , ( ) B....

... , , . , , Z, - . , . , , , .

, ?

, , (box2d ) . , keybind, J, , .

. , , , , , , .

. - , , , , , .

, , , , , , , , , , , , , . , .

+1

Source: https://habr.com/ru/post/1568054/


All Articles