- Home /
Door Animation Setup
At the moment I have done a door animation in 3dsmax.
Door is closed at frame 0. Between frame 0 and 20 it opens. Then I don't know how to animate - What shall be between frame 20 and 100?
Shall it be open, 20-80 and then I animate it to close 80-100? Or shall I just close directly after frame 20 and closed at frame 40? How does it works and how should I do? I don't know how to scrpt it yet but I think I need to make the animation first.
Just to clear out things, I want my door to be opened via pressing a button at the wall, and it is a sci-fi "blast door" that opens very fast, if it makes any diffrence.
Thanks :)
Answer by StephanK · Oct 31, 2010 at 11:16 PM
You could either make an animation that opens, stays open, and then closes, but that would mean you would have to tinker with the animation when you should ever decide to change the opening time of a door. Also you might not want it to shut down automatically while you are walking through.
A better idea would be to just have an opening animation and maybe a closing animation (which basically is the reversed opening animation) and trigger them accordingly. To make the door stay open you can just set the opening animation wrap mode to clamp forever. That should keep it open until you trigger the closing animation.
If you are lazy you could also just set the time for opening animation to -1 to reverse it and use it as closing animation.
Thanks! But is there anywhere I can read about weap mode and stuff? Need a little explanation.
Yes, the documentation that installed with Unity... There are some pages on how the animation system works.
Answer by IceCreamTruck · Oct 31, 2010 at 11:36 PM
For my project, I did four door animation..
- Door closed - prolly it's 1-1?
- Door opening - 1-20 in your case?
- Door open - 20-20
- Door closing - 21-40
hope this helps.. :)
If I animate my door, can I have a working mesh collider on it?
Yes, you can. You should be able to tick Generate Colliders when you import your 3D asset in your scene, and that should do the trick. :)
I have ticked "Genereate Colliders" but I can still talk through my animated door.
Ah, thanks. When I applied the collider to both seperate door (I have two) it worked :D
Your answer
![](https://koobas.hobune.stream/wayback/20220613081502im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
How to open a door with the "E" key 1 Answer
Open Door Via Trigger Collider 0 Answers
Door will not open with the press of a button 1 Answer
open and close door 0 Answers
Looking for tutorial for door animation using mecanim 2 Answers