Help with door animation

Ok this is p robably around somewhere but i need it quickly

I have a sctructure with an "Entrance door" [preanimated in cinema 4d]

In cinema 4d this door is animated as follows:

door opens: frames 0 - 25

door closes: 30 - 55

closed position: 55 - 60 [the door does animated correctly in cinema 4d etc]

In Unity

Entrance door > Inspector panel > animation (is ticked) >Animation (none)

I also have the following script titled 'animationTrigger'

//the trigger function OnTriggerEnter (col : Collider) { var door : GameObject = GameObject.Find("entrance door"); door.animation.Play("open"); }

function OnTriggerExit (col : Collider) { var door : GameObject = GameObject.Find("entrance door"); door.animation.Play("close"); }

however

I also have a cube which is a trigger (it is ticked).

What else do i need to do to make the door open and close whenn my fps walks up to it??

Please explain simply im not an expert. Sorry and thanks!

Will Goldstone, author of Unity Game Development Essentials, has a video series which covers animating a door exported from Cinema4D:

Lesson Two [Cinema 4D Animation & Interaction]

Part 5 shows how to setup objects and code in unity.

Hope this helps!