I try to make a door

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

Hello, I am trying right now to make a door in Godot 2D. But I don’t know what is going wrong. May you can help me?
this is my code

Try uploading your screenshot to imgur. You’ve pasted an url for a file in your C: drive, which we can’t access.

Alternatively, paste the code (don’t forget to use the curly braces icon {} to format the code!).

Also, describe your problem with more details. “I don’t know what is going wrong” well if you don’t know what’s wrong, how are we supposed to know what’s wrong? Please tell us what is the behaviour you expect and what is the behaviour you see.

Bernard Cloutier | 2020-10-29 17:22

Is this top down or sidescrolling? How do you want the door to work? How will it function?

also, your image isn’t working, so we still can’t see your code :frowning:

Millard | 2020-10-31 16:05

:bust_in_silhouette: Reply From: Firty

I used a RiggidBody2D, with two Pinjoint2D. The first I connected the wall to the door with softness 0. The second I connected the door to the other wall using softness at 16. The first one works as a hinge, while the second is used only to force the door back into its original position.