Door closes when scene launched

I got everything working properly except for when I start the level the door begins in the start position and then closes. How do I make the door start in the closed position?

thanks

You can add two more animations, DoorClosed, and DoorOpened, both with just a single frame of animation with the door in that state.

Start on DoorOpened, make transition from DoorOpened to DoorClosed, make it instant and based on a new parameter, DoorCloseInstantly.
Then in the script trigger that parameter if it starts off closed. It will default to DoorOpened, then as soon as it starts it will trigger that parameter which will instantly transition to DoorClosed.

Then make the transitions from those static states to the regular animation states.

2 Likes

As a really tacky fix, I just set animator.speed to 100 in the Start function, and reset it to 1 in the DoorOpen and DoorClose methods. It makes that first unwanted transition instant then goes back to smooth moves when the door is used normally :wink:

2 Likes

That’s a good hacky trick!

1 Like

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.

Privacy & Terms