Pivot Joints

Hi,

i just bought Level Director and it really makes fun to work with it.

At the moment i have some problems creating pivot joints. Is there any documentation about how to create them? For example i only want to create a simple joint like:

joint = physics.newJoint( “pivot”, box1, box2, 100, 125 )

As far as i understand a pivot joint works as if you hammered a nail through two overlapping boards, and then those boards will rotate around that nail like an axle. So how can i determine this point for the “nail” (in my example  100, 125)? In the property window i am not able to change the X and Y values.

Thanks in advance.

Thomas

Hi @Toga,

The X and Y of the “nail through the boards” (your analogy is correct) is a coordinate in the content space. If you want to attach the two objects but you don’t know the exact point (in content space), you can check the X and Y position of either object and then use that X/Y for the pivot point. However, if that pivot point needs to be offset on one of the bodies, and that body is rotated, it gets a tiny bit more complex (but it’s possible). If this is your case, I can explain better how to get that point.

Best regards,

Brent

Hi @Toga,

The X and Y of the “nail through the boards” (your analogy is correct) is a coordinate in the content space. If you want to attach the two objects but you don’t know the exact point (in content space), you can check the X and Y position of either object and then use that X/Y for the pivot point. However, if that pivot point needs to be offset on one of the bodies, and that body is rotated, it gets a tiny bit more complex (but it’s possible). If this is your case, I can explain better how to get that point.

Best regards,

Brent