Opening and closing door

How do you script opening and closing doors?

im guessing:

when the player is close to the door && the “f” key is pressed play animation etc
whats the easiest way to work out if a player is at a door? separate collider? Calculate
the distance between the door and the player (sounds expensive though)

if anybody knows a good tutorial please let me know

Thanks

Did you even try to google for door tutorials?!

5650492--587548--Screen Shot 2020-03-30 at 3.09.15 PM.jpg

1 Like

duh

1 Like

It’s all good my friend! Welcome! Take a whack at a tutorial or two (quality does vary a lot!), and always feel free to post pointed questions you might have here. Remember to format any code you post (see first forum post), say what you think should happen, what happened, and look in the error log for any messages!

Hi Kurt yes was a bit lazy, watched 1 or 2 i didnt like…persistence is key!!! Thanks for all your help!!!

After changing to GetButtonDown its working way way better!!! still not perfect! but fine for now
thanks again!

1 Like