I have a door GameObject, when the user presses “e” the doorOpen() function on the door game object is initialized.
What I’m wondering is what would be the best way to make the door open? If I rotate the door it only rotate ls from the center of the door and not from the hinges.
I don’t know if this is the best way, but my solutions was create an empty game object at the hinge, then make the door a child and rotate the empty game object instead.