Yes, totally forgot to add that option in this!! To close the door, the easiest way is, at 2:15 in this video, to extend the "DoorOpen" animation, and add more frames to create the close door animation. For example, from 0 - 1 second is open door animation, 1 - 4 second is keeping the door open, 4 - 5 second is close door animation. That way, you don't have to change anything in this script, and the door will automatically shut after it has been opened for 3 seconds.
Very nice would've been even better if you added the code in the description so people could quickly copy it. And could you make it so I can close the same door
Nice videoo, but you could rather call a Coroutine when the collision is triggered, and stop it when is exited. This way unity will only be checking wether the E key is being pressed if the player is on range, and not in every single frame of the game.
Hey DIGA Hub i have a question. When i open the door and it closes again (I have made it so it also closes in the animation) It's shows the option Press (E) to open but i does not open again could you help me out here?
Sir, I had a problem, I followed your tutorial in doing the door but when I try the second door, it wont open but just disappear and my first door cant be open anymore..... may I ask for sir help?
hi, i have some problem that is when i copy and put in another location. When I play, when I press both doors open at the same time and I use raycas instead of keycode
Hi there! In the script, two conditions must be met to open the door: (1) Player is in the trigger, (2) Player pressed "E" key. See this tutorial at 10:17. At Void Update line, if "Input GetKeyDown" (pressed E key), and if "Action is true" (player is in the trigger), the door would open. Double check your script and you should be able to solve this issue.
No, you don't have to create a new animation for new door with different shapes. The animation was create on a cube (see 1:23) and the door model was parented to the cube. That means that you can simply duplicate this whole door group ("DoorV1" in the video), place it at a different location, replace the door model under the cube. Your can also duplicate the DoorOpenTrigger, but remember to change the "Anime Object" to the new door (see 13:24).
It sounds like something is wrong after you did copy and paste. Your first door is fully functioning so that's good. I recommend just delete the second door group. Select the first door group (the whole GROUP containing the door and the trigger), duplicate it, and move it to the new location. Refer to the video to see how I group the door with its trigger. If you copy and paste it correctly, your second door should working without any issue.
i have some questions for you, 1. why my door is not animation but play sound 2. why my door is not animation but play sound 3. why my door is not animation but play sound 4. why my door is not animation but play sound 5. why my door is not animation but play sound
you totally forgot the option to close the door
Yes, totally forgot to add that option in this!! To close the door, the easiest way is, at 2:15 in this video, to extend the "DoorOpen" animation, and add more frames to create the close door animation. For example, from 0 - 1 second is open door animation, 1 - 4 second is keeping the door open, 4 - 5 second is close door animation. That way, you don't have to change anything in this script, and the door will automatically shut after it has been opened for 3 seconds.
@@DIGAHub But if we wish to close it using the "E" button , what will we add or change in the script ?
@@DIGAHub How to open door with a key , if you have a key
I spent the whole day trying to make a functional door, your tutorial was the only one that worked. Thanks
Glad it helps!
Very nice would've been even better if you added the code in the description so people could quickly copy it.
And could you make it so I can close the same door
its in the description u just have to scroll down a bit (:
When I open the door for the first time, everything works but I can't open it for the 2nd time.
De onde você tirou o som da porta?
where am i can download this assets?
Thank you :D
where did you get the sound of the door?
Nice videoo,
but you could rather call a Coroutine when the collision is triggered, and stop it when is exited. This way unity will only be checking wether the E key is being pressed if the player is on range, and not in every single frame of the game.
Hey DIGA Hub i have a question. When i open the door and it closes again (I have made it so it also closes in the animation) It's shows the option Press (E) to open but i does not open again could you help me out here?
Sir, I had a problem, I followed your tutorial in doing the door but when I try the second door, it wont open but just disappear and my first door cant be open anymore..... may I ask for sir help?
Same Bro
hi, i have some problem that is when i copy and put in another location. When I play, when I press both doors open at the same time and I use raycas instead of keycode
how to open animation set new state, not a DoorOpen
So... you can open this door even if you don't look at it?
its automatically disabling the Text when i touch the collider it doesnt show the text
Hello DIGA hub. I have a problem, when i press E the door opens even when you are not in the trigger, how can i fix that?
Hi there! In the script, two conditions must be met to open the door: (1) Player is in the trigger, (2) Player pressed "E" key. See this tutorial at 10:17. At Void Update line, if "Input GetKeyDown" (pressed E key), and if "Action is true" (player is in the trigger), the door would open. Double check your script and you should be able to solve this issue.
the animation doesn't work for me
Do I have to make a new animation if each door has a different shape? Can't you copy it?
No, you don't have to create a new animation for new door with different shapes. The animation was create on a cube (see 1:23) and the door model was parented to the cube. That means that you can simply duplicate this whole door group ("DoorV1" in the video), place it at a different location, replace the door model under the cube. Your can also duplicate the DoorOpenTrigger, but remember to change the "Anime Object" to the new door (see 13:24).
please help me some budy i am getting this error
ArgumentNullException: Value cannot be null.
Parameter name: source
I'm having the same problem did you ever figure it out?
Can Someone please help my first door is opening but the second door when i press E just disapear and the first door open automatically
It sounds like something is wrong after you did copy and paste. Your first door is fully functioning so that's good. I recommend just delete the second door group. Select the first door group (the whole GROUP containing the door and the trigger), duplicate it, and move it to the new location. Refer to the video to see how I group the door with its trigger. If you copy and paste it correctly, your second door should working without any issue.
@@DIGAHub Brother can plz plz plz pleasss make a video now on this. how to open doors in unity using c# plz bro.
@@DIGAHub Mine just disappears on the first one lol.
Great tutorial! But how to open double sides door? :D
Solved! Just added "public GameObject AnimeObject2;" and put the second doors in there
@@mackas_3213 Yes, that will replicate the animation.
The door open but closes right after and i cant open it ever again unless i restart. Any ideas? I havent changed the script
Did u figure it out?
If so could you pls tell me
i have some questions for you,
1. why my door is not animation but play sound
2. why my door is not animation but play sound
3. why my door is not animation but play sound
4. why my door is not animation but play sound
5. why my door is not animation but play sound
Bro where is UI? In my unity version there is UI KIT
Hey this stupid door rotates in center instead being attached to the cube and the cube rotating on its center
Can i get the fps script
No script??
in description at the bottom (:
Pls project link
Where is this so called presskey script? I followed every other step.
You can download it here: drive.google.com/file/d/1axYKr394qoI4utodY-Jyi6-3iyXkPQ6S/view?usp=share_link
C++? Unity uses C#
Who said C++?