"Star Trek" door

Super simple door I’ve fooled around with. Initially I did this by actually moving the transforms of the door panels in Udon, but doing it with an animator state machine is MUCH simpler.

4 Likes

You can avoid having to manually set the animator, by using a gameobject.getcomponent() node with an animator type plugged in, since gameobject will default to self.

That said, you should actually do that in start and save the animator component in a private variable on your graph, since calling getcomponent every frame is expensive!

3 Likes

Ah, okay!

This is much cleaner for setup of many different doors. I also added a sound effect:

3 Likes