I'm developing a game and its gameplay considers attaching objects together. For example, player can grab objects with the hook, or some objects should be attached to the ground and player should apply some force to get them out. So some kind of fixed joint behavior is required.
I've tried the folowing tricks, but each had its flaws:
1. Used b2FixedJoint from the contribution - it behaves crazy when the object is attached to the ground and to the player at the same time (2 fixed joints).
2. 2 revolute joints - I get an impulse accumulation or something when the warm starting is on. A hard to reproduce issue, but it happens in my case.
3. Triangular distance joint connection - not really fixed - if a big impulse is applied it can reconfigure the position and not return back.
It seems that the native way to get the fixed joint behavior is to attach/detach shapes to a shared body. So the connected entities should form one body. Not a trivial task though. But there is no way to get the reaction force to decide if the object should be detached.
So I'd like to hear comments from the experienced users or the Erin himself. What direction should I follow to resolve the issue?
I've tried the folowing tricks, but each had its flaws:
1. Used b2FixedJoint from the contribution - it behaves crazy when the object is attached to the ground and to the player at the same time (2 fixed joints).
2. 2 revolute joints - I get an impulse accumulation or something when the warm starting is on. A hard to reproduce issue, but it happens in my case.
3. Triangular distance joint connection - not really fixed - if a big impulse is applied it can reconfigure the position and not return back.
It seems that the native way to get the fixed joint behavior is to attach/detach shapes to a shared body. So the connected entities should form one body. Not a trivial task though. But there is no way to get the reaction force to decide if the object should be detached.
So I'd like to hear comments from the experienced users or the Erin himself. What direction should I follow to resolve the issue?