Drag a door to open it

I’m currently trying to program a script which makes door open using mouse dragging, im almost sure theres some rigidbody in the solution…i dont want you to tell me the answer, i just want some hints and i’ll figure it up.

Theese are the steps i took for making my dragable door:

1:Decide with colliders which side of the door you are on.

2:With raycast, make sure to hit the door with GetMouseButtonDown (under a special tag).

3:When the door is selected, disable your Component that looks around so that your camera is freezed. Then with GetMouseButton make it like this: using Input.GetAxis(“Mouse X”)> or < then 0, depending on if you swipe your mouse to the right or the left add a relative force forward or backwards to your rigidbody door. (Your door should be attached to a hinge joint)

This way you will get fluidity and it will look physically right. You will have to mix with drag and force speed, but the end result is really good.

Hope it helps, and if you get stuck i can post my script, and give you some ideas :slight_smile: