Some coding I've been working on after 10 hrs of level designing.


First, I use Collision detector ( OnCollisionEnter , OnCollisionExit) to see if the door is colliding with the player object during animation (collsion.gameObject), then I separate each case for opening and closing animation. If the normal property of collision.contacts[0] ( very first collision and stored under vector) is facing forward ( x=0, y=0, z=1 ) and the door is playing "opening" state or the contact vector is facing backward( x=0,y=0,z=-1 ) and the door is playing "closing", the script change the speed of those states to 0.  

Get 707 ( DEMO )

Download NowName your own price

Leave a comment

Log in with itch.io to leave a comment.