creating a door with unity animation

hi,
i am new to unity and am trying to create an opening and closing door for a house within unity using unity’s animation. I tried my self but i could nver get it to move from teh axis that i wanted it to.

I was using will goldstones tutorial and found them very useful but when it came to animation he started using cinema4d, a package which i do not possess. is there any way i can create a opening and closing door within a house.

thanks kieran

if u go to the next tutorial on his website from learnmesilly.com, so the next Lesson after the House making, u can download the code. and the house + scripts/doors are included :slight_smile:
Download that and then modify it :wink:

thankss though but it didn’t work i do not have cinema 4d so it could not import he file as an fbx

For animating a door try this:

  1. Create an empty GameObject, place it at where the hinge of the door would be, name the empty GameObject “Hinge”
  2. Create your door mesh, add it as a child of the Hinge GameObject, position it to where the door really should be with the Hinge object off to the side.
  3. Open up the Animation Window, select the Hinge GameObject and play with the transform. Note that you may need to select the nodes created in the Animation window and right-click and select “Flat” as the default seems to use smoothing which overshoots.

I dont have C4D neither.
What u have to do is download the file, go to the assets folder, where he has the c4d file, copy paste this to your project, and then reimport the Assets in your unity. it will be there now.
then just drag and drop onto your scenery vieuw. and this shouldnt be a problem, if u still have problems, i can show u a guide later.
Allthough u need some scripts also, id recommand taking the second lesson i think, with the collisions.
There are scripts needed for detected collision with the door.
Which u need to rewrite as onButtonpressed etc.