Rope joint .maxLength returns boolean

Can someone else double check this? I just tried it in two projects both returning true, is it a bug or is there a reason for it?

@Luatee From what I figured out, if you do a print(joint.maxLength), it returns false if maxLength wasn’t set. It returns true if maxLength was set.

@Luatee Ignore my last answer. Now I’m getting mixed results ,so maybe it’s just returning whatever it wants. I think it should return the maxLength value if it was set and nil if maxLength wasn’t set.

@Luatee Can you verify this. If maxLength is less than 32 it returns false. If it’s 32 or more it returns true. That’s what I’m seeing right now when I’m checking different maxLength values.

Why 32? Is it something to do with weather the rope is being stretched (if the bodies are 32 or more apart?)

@Coder I don’t know. All I know is, if I make a loop creating a ROPE joint and increase the maxLenght by 1, then do a print(…maxLength), it prints false until it reaches 32, then it prints true after that. I haven’t tried very much above that to see if it changes to false at some point.

Pretty sure 32 is the default pixel to meter ratio, I had to divide another value returned by the motor/slider joint for the motor force, kept going in normal then coming out 32 times larger when I came to read it. I do know this though @dave1707 if you use joint.maxLength = n after creating the joint (it still returns true when trying to read it) it sets the rope length to 32 times longer than the number (n) so I’ve been dividing that by 32 also!

Prismatic maxMotorForce needs to be divided by 32 as well