Jump to content

Questions about FixedJoint


photo

Recommended Posts

Posted

Hi, 

I have two questions,  when I visualize the fixed joint in the editor I saw there are two parts of the joint 

one part is the red color and the other part is white color

the red part can change dynamically and white part seems don't 

Question1: what are functions of the two different color part of the joint? can I edit them?

Untitled15.thumb.png.bdc118d506f394c66c0f9a05f525f6ee.png

Question2: when moving a body fast, the red part of the joint  that  attached to the body will become very long such as the picture 2: 

Untitled14.thumb.png.a2eaed187d5d0cbf57ac88b7ed01999c.png

is there any way to set the limited range or the maximum distance of the red part of the joint?

Thanks

Posted

Hi, de-Roo.Lukas!

Quote

Question1: what are functions of the two different color part of the joint? can I edit them?

White part - is your anchors attached to bodies.
Red part - is a tension (distance between body0 + Anchor0 and body1 + Anchor1). It always tends to zero when physics is enabled.
You can change anchors via "Fix 01" button -
it will set the ends of the anchor exactly in the middle between the two bodies (red part will disappear).

 

Quote

Question2: is there any way to set the limited range or the maximum distance of the red part of the joint?

Unfortunately, indirectly only.
You can:
1) Increase values in joint->setLinearRestitution() and setAngularRestitution()
2) Decrease values in joint->setLinearSoftness() and setAngularSoftness()
3) Increase value in joint->setNumIterations() - best result, but slow

 

 

Best regards,
Alexander

×
×
  • Create New...