- Home /
Opening, Closing, Keeping door open at proximity
Hi. I made an animation for a door. The door opens from frames 1 to 20 and closes from 20 to 40. I also did a trigger cube, which means that when the player get's in that cube (close to door) The door opens but closes just after.
I'd like to make the door open when the player enters the Trigger-cube, stay open while he's in, and close when he get's out.
Please help, THANK YOU!
Answer by StephanK · Nov 04, 2010 at 12:35 PM
Split the animation in open and close. You can do that in the fbx importer settings. Then play the open animation on trigger enter and the closing animation on trigger exit.
The only problem is that I animated the door in Unity so the animation doesn't appear on the FBX (3Ds) importer...
@Atnas-There's an animation view in Unity. You can create your own animations in there. It's pretty useful. You should try it.
The answer is the same even if you animated it in Unity - split the open and close into separate animations and then play them separately. To do it fairly easily, you could duplicate your animation clip, remove the end of one of them and the beginning of the other (sliding your keys over) and the animations have been split.