Have you considered using animation to move the door? You could just make an animation file, and then call it within a script.
Here is a sample script from MC HALO:
var DoorOpen : AnimationClip;
function Update (){
if(Input.GetKey(KeyCode.A)){
animation.Play("DoorOpen"); // This is playing the animation which will be stored in the Animation variable above this will be your door animation.
}
}
↧