Omg i literally searched all of KZbin and all of the totorials were like 500 lines of code. Thank you for making this
@vikirthanarul21933 жыл бұрын
This is such a perfect tutorial. Not so fast. Not too slow. Perfect pace to follow. Thanks a ton!
@striverfor76282 жыл бұрын
0:44 Animation 13:36 Script Coding 13:59 16:11 OnTriggerEnter 18:18 Closing the door Coding 18:52 OnTriggerExit 19:56 Fixing a problem. Enlarge the trigger
@darkmonarchy22064 жыл бұрын
nice to find a tutorial a total amateur like me can digest, so many unity content creators struggle with the "this is all new to me " concept, many thanks
@suspense_comix3237 Жыл бұрын
When I was younger and just started Unity, I only knew how to use Collision to detect stuff, like, if the player was on the ground or something. However, when it came for me to add doors to my game I struggled because I didn't know how raycasts work. So I decided to use the good old colliders to try to solve my problem. I set up a capsule collider which extended around the torso of my player, shaped like a pill, and used Triggers and stuff to try to open doors. Did it work? Kind of. Was it good? Absolutely not. You could literally grab ANYTHING out of closed doors, more specifically through wardrobes and closets and cupboards.
@julianlim17423 жыл бұрын
very nice tutorial, was patient in explaining each step and how to tackle potential issues that may come up in the making of the animation. Very helpful especially since its my 1st time using unity for my project. Like button SMASHED.
@xAkinaNozomi3 жыл бұрын
Thank you so so much for this tutorial, I was so desperate, because tackling all that code for the first time can be so intimidating without the proper explanation. You literally just saved my day, thank you.
@ramonalders82053 жыл бұрын
i am lookin for the same awnser
@jonshidler28914 жыл бұрын
Been trying to find a good tutorial for doors and couldn't. Thank you for making this tutorial very helpful got my level working!
@Bill-us8nn4 жыл бұрын
Great tutorial, thanks. Hope the channel grows as it deserves to...
@BugBench3 жыл бұрын
I've been searching for days! i finally did exactly what i was aiming for! thank you for the great tutorial
@chrisa75834 жыл бұрын
i have 2 animations that have a transition into eachother. When i modify the bool, its playing the open animation then directly closes. any help?
@MoreNimrod4 жыл бұрын
In your assets, click on the animation ciips. If you have an animation for opening the door or closing the door, uncheck 'Loop Time'. That means it'll only play once now after the bool is modified; otherwise it wants to loop the animation and it looks off.
@xAkinaNozomi3 жыл бұрын
@@MoreNimrod Just had the same problem and this fixed it, thanks :)!
@thehijacker63402 жыл бұрын
I am having an issue with Animator is not playing an AnimatorController. Does anyone know how to fix this issue?
@peopledevelopmenthrdcikara24952 жыл бұрын
Thank you Cor Games for this tutorial, its very help
@ZyonOfficial3 жыл бұрын
I have a problem where i get pushed by an invisble opening and closing door but the actual visible object isnt moving at all?
@aw69714 жыл бұрын
Finally!! Thank You!!!!! Subscribed......
@projectRaMan Жыл бұрын
Is there a better way of fixing the trigger problem that isn't making it huge? What if you have a floor above and below that floor and something enters the trigger?
@TheShoden5 жыл бұрын
Very cool! Thank you for posting this tutorial.
@eyelight11912 жыл бұрын
Thank you so much, this was allot of help to me, keep up 🍀
@Radek_M.2 жыл бұрын
When you double click the "chest-menu" button you have yo also double click the background button to close it. Anyone has figured out how to fix it?
@fredqq20032 жыл бұрын
I found out that our player needed be to added a character controller component in order to trigger the door. Is that true?
@bromine353 жыл бұрын
My collider is being animated up and down since it is a child of the door. How can I prevent this?
@But_WhatIf3 жыл бұрын
you saved my ass, had to get open doors done for a Project and could not remember for the life of me how to script it.
@burgies16364 жыл бұрын
Easy to fallow tutorial. Keep up the good work!
@pogchamp10813 жыл бұрын
Such a great toturial! I was lloking up so many videos but none of them worked.
@kozmobotgames Жыл бұрын
Great video! I have also made the unlockable door in Unity and my scene is pretty much low poly 😀
@leasboul2 жыл бұрын
Extremelly difficult to complete! What university degree you need first in order to understand Unity? Also where can I find THIS door to import it as an asset? Because I tried with any other and doesn't work
@Btomaek3 жыл бұрын
it is 2021 and i couldn't get the script to run on 2020.3.17 i needed to get rid of "windowAnim = this.transform.parent.GetComponent();" and add "public" to the first line that was written then drag the object the scrip was in into that and everything now working this is a good tutorial just i'm not sure if it needs updating
@Albert-Freeman3 жыл бұрын
Is there any way to make the trigger just not move? So I don't need to change its size...
@etheriondesigns2 жыл бұрын
Great tutorial! However, I am creating a door prefab. And since the prefab has multiple instances in the level, this code seems to only work for one of them. The rest are doing nothing! Do you have a method to make sure all instances of the door prefab also animate?
@zoomonnick65173 жыл бұрын
you are a king good sir
@erikm976811 ай бұрын
Perfect, didnt know this was possible! thought you had to do it in Blender and import an fbx
@divyasrivatava1343 жыл бұрын
Use on trigger stay for opening and closing door
@_ciraz_3 жыл бұрын
Help please... My door is always opened but it doesn't want to close.. I have "Loop Time" deactivated on the Opening and Closing animation. But the On Trigger Exit somehow doesn't work and it's not because of the coding, since I don't get any error in Unity.
@appelbanaan26333 жыл бұрын
i need help tooo, do you know how to fix it now?
@_ciraz_3 жыл бұрын
@@appelbanaan2633 no, I am sorry
@pizzacat63244 жыл бұрын
For some reason, when i start the game, my door teleports to 0,0,0. can i have help
@drewpriebe53724 жыл бұрын
Did you ever figure this out? In scene view everything is perfect, but when I start the game my door also teleports
@ImInfenix4 жыл бұрын
@@drewpriebe5372 I think this is normal. Just place an empty gameobject in the scene where your door is supposed to be and place your door as a child. Then it will still go at 0,0,0, but the 0,0,0 will correspond to the parent's transform. Your animation is a local animation, you are animating that specific door, so you need to do it. Otherwise, the parent object is the scene root and so your object teleports to it at runtime.
@appelbanaan26333 жыл бұрын
@@ImInfenix oh thx bc my doors are disapearing to thx!!
@appelbanaan26333 жыл бұрын
but it still didnt work
@Sharkz-iz6yf4 жыл бұрын
14:00 I’m gonna go swim now :)
@monke55073 жыл бұрын
thanks man your best keep going
@kerazza35744 жыл бұрын
not working: "The referenced scripts on this behaviour "Game obcject "DoorTrigger") Is mising
@CorGames4 жыл бұрын
Have checked is trigger?
@roshan3554 Жыл бұрын
Great vedio a request for make a vedio how to open when interact a door by clicking "e" and use keycode to open
@lovecraftiancat66463 жыл бұрын
Thank you so much this really helped a lot!
@BomberTVOriginal3 жыл бұрын
So my door opens and closes, but for some reason my character doesn't go through the door. Any ideas as to what could be the cause or what to look at?
@BomberTVOriginal3 жыл бұрын
Nevermind. I didn't realize that the unity Character Controller has what seems to be some kind of built in collider. Fixed.
@ramonalders82053 жыл бұрын
@@BomberTVOriginal how did u fix it. i am facing the same problem
@BomberTVOriginal3 жыл бұрын
@@ramonalders8205 I havent messed with it in a while so sorry if I'm lacking on details. Your character has an invisible hitbox. One of the issues could be that the hit box is just too big for the for. If you make it small, you should be able to go through. That was my issue.
@ramonalders82053 жыл бұрын
@@BomberTVOriginal thank you verry much. I fixed my issue as well :)
@Username-it8co4 жыл бұрын
What if you want to have more than 1 door?
@CorGames4 жыл бұрын
Duplicate the while thing and rename where applicable
@kidnappednapkin4 жыл бұрын
Could you do a short video on that problem
@mariusst09 Жыл бұрын
Thenks bro ❤
@gh4zera4 жыл бұрын
hello, i need help. I have this error : There is no 'Animator' attached to the "Trigger" game object, but a script is trying to access it. You probably need to add a Animator to the game object "Trigger". Or your script needs to check if the component is attached before using it. Can you help me ? Thank in advance.
@thommarch64093 жыл бұрын
Try add the doorTrigger to the door Game object not to the Parent object
@D3ADM0N5T3RC4T2 жыл бұрын
thank you so much! 😄
@christopherfarrell-artist35574 жыл бұрын
Thank you!!!
@adriangg90183 жыл бұрын
Thanks!
@igoraction4 жыл бұрын
Greeaaaaaaaatttttt!!!!!
@ibrahimkeskin17233 жыл бұрын
So Thanks :)
@kevo3323 жыл бұрын
TYSM
@direct3d344 жыл бұрын
Thanks for a very nice tutorial :-) Can you make a tutorial that shows: Player Enters Collider- A text message comes up: ("Press E To Activate Door") and when E is pressed the door opens :-) This should only be possible inside the collider And add sound to the door opening and another sound to the door closing :-)
@rickym73804 жыл бұрын
to add a sound just put a underneath "audioSource.Play();" "_doorAnim.SetBool("IsOpening", false);" and "_doorAnim.SetBool("IsOpening", true);"
@TajuSingh4 жыл бұрын
my visual dose does not show the animator
@hugofekar87953 жыл бұрын
i have the same problem
@Morrisonfam20203 жыл бұрын
wow cool video 5 STARS
@CHTOUROU_BECHIR2 жыл бұрын
Seriously?? you should have detach the trigger from the door so that it doesn't get animated with it, it's a very basic solution and it might teach your subscribers some very bad coding methods.😶
@chknmcnuggers45772 жыл бұрын
how
@CHTOUROU_BECHIR2 жыл бұрын
@@chknmcnuggers4577 lol this was 9 months ago, i dont remember till i review the video, i can't now 'cause im in my office for Work 😋