- Home /
cannot rotate door on hinge
Hello, I would like to make a door in unity. First , I create a cube and adjust it shape to look like a door. and it can rotate from a middle. So I googling and find that I must do an empty/cube object and make it as a hinge at the side of the door, then let object door to be a child of the hinge.seem to be simple right? but I still cannot rotate it from the side, the rotate point is still at the center of the door.
in short : door's rotate position take over hinge's rotate position even door is a child object of a hinge.
Answer by fffMalzbier · Mar 23, 2018 at 08:48 AM
Your editor is in Center mode and not pivot mode. In the upper left of the editor you see tow buttons , Center and Local. Press the Center button to change the editing tools to use the objects pivot and not the center of the objects group.
Thank!! Now I can make it rotate on a side after got stuck for couple days.
Hey @rorocrocky I have a free door script asset that you could check out to get more insight in the rotation of doors. You can check it out here!
Answer by Cornelis-de-Jager · Mar 23, 2018 at 06:19 AM
Hi rorocrocky,
I think a better solution would be to use a joint.
Watch this Youtube Video on how to use joints:
Your answer
![](https://koobas.hobune.stream/wayback/20220612155202im_/https://answers.unity.com/themes/thub/images/avi.jpg)