Revolute Joint not Connecting at Custom Points (2D physics)

Before proceeding, please use the forum search feature at the top of the page to check if your question has already been answered.

Hello,

I am trying to get the “Arm” object to connect to the “Body” object with a revolute joint. I’m trying to connect at the “Shoulder” custom point of the Arm and the “Socket” custom point on the Body but there seems to be some sort of offset that’s happening. See screenshots below.

Also, it seems strange that the “Arm” is going through the “Ground” when both have the same collision layers and masks.

Other events are allowed?

Sorry for late reply. I’m not sure exactly what you are asking but I have deleted all other events in the game and it has the same results.

Thanks for responding.

I did almost the exact same thing today and it worked fine. With mine though, I created the event for the body whereas you’ve done it for the arm. So just now I made some new objects and created the event for the arm just like you did and it worked fine. I’m still on GD 5.6.269, could that be making a difference?

Okay, to be thorough, I made a project in the online editor which is on version 5.6.271 and did the same thing and it still worked. My own project has the joint in a beginning of scene event but I tried it your way too with a trigger once and it still worked. Therefore, I don’t know.

I had a similar issue awhile ago. For me, the solution was to not move the object’s center point. Leave it in the center. I haven’t tried it recently.

https://forum.gdevelop.io/t/rotating-off-centre-polygons-with-physics2/76014/4?u=keith_1357

I guess Points need to based off of something. Are they based off the Center Point? Moving the Center point doesn’t move the object like when moving the origin but it does seem to affect the revolute joint. I wonder if the same goes for other joints?

I tested Keith’s solution and it’s right. If I changed the centre point of the arm then the alignment wasn’t as expected.