Problem with PinJoint2D

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Nophlock


I’m currently making an topdown game that has doors that I want to rotate around the hinge as soon as any physics object is touching it. So after a bit of research I’ve found the the “PinJoint2D” is the perfect node to achieve this. However for some reason it doesn’t work the way I wanted.

Here is my current hierachy for my door:

enter image description here

And the door still get’s pushed around by an “PhysicsObject” like it’s not attached to anything. I’ve already took a look in the platformer demo where they implemented a seesaw and after copying every settings from the nodes they used there(to maybe get a clue where my problem lies), my seesaw/door still behaved completely different as in the demo project. So there is probably just an option I’ve missed somewhere(outside the nodes settings probably) but I have no clue which one. Does anyone have an Idea where the problem here lies?

Thanks for any help

:bust_in_silhouette: Reply From: Nophlock

Nevermind, I found the solution. Actually the problem was that a parent node got removed from the SceneTree and then added back again which the physics engine seems to confuse. After fixing that, everything seems to be fine :slight_smile: