I'm having some difficulties with Box2D DistanceJoints, I'm trying to create a rope using DistanceJoints connecting some bodies together but the length of joints between bodies change due to weight of bodies, is there any way to prevent joint lengths from changing?
Answer
For those who may encounter this problem in the future: I just changed my approach, I used some Revolute Joint
to connect bodies together and mark all bodies as sensor so that they don't collide with each other (tell me if you any better way to avoid collision of the rope parts), and use boxes to fill the space between joints (previously it was Distance joints connecting circle shapes). Having density set to non-zero value the result looks like a real rope.
No comments:
Post a Comment