How to make a door open vertically but still stay attached to the object.

Hello everyone,

I am very new to unity and am currently using Hololens. I wanted to on click have the Sls Mercedes doors open which open vertically like a butterfly. I know how to do it on click but I don’t know how to create the animation because when I rotate the door up the whole door rotated and the top part that is supposed to be attached to the body of the car is not attached and also moves.

Is there any way I could attach the door to the main body of the car to have it open vertically like a butterfly but only have half the door rotate up and the other half stays fixed?

Thank you

Tagged:

Answers

  • Hey Artur,
    These type of questions are probably more often addressed on the unity forums, but that being said: You should create an empty gameobject at the top of the top and have the door as a child to the empty gameobject. When you rotate the empty gameobject it will rotate from the top.

Sign In or Register to comment.