Creating a HINGE DOOR in UNITY!

  Рет қаралды 60,439

SpeedTutor

SpeedTutor

Күн бұрын

Пікірлер: 150
@SpeedTutor
@SpeedTutor 4 жыл бұрын
You don't need DIY skills to use the hinges on these doors! :D 🔥UNITY SAVINGS: bit.ly/UnitySalesHub 🔥SpeedTutor Unity Store: bit.ly/STUnityStorePuzzlePacks 🔥HUMBLE SAVINGS: bit.ly/HumbleBundleDeals
@wolfie1001
@wolfie1001 Жыл бұрын
anyone that finds the door doesn't move when you walk into it and you are using a character controller, then you need to add another empty to your player somewhere that has a sphere collider and a rigidbody with gravity unchecked, position in front, its your invisible hand, create a layer for this, i used door, it only is used to push open doors, add that layer to the door too, go to project settings, physics and at bottom the layer collision matrix, uncheck all layers for the door layer expect itself, that way only door layer colliders will interact with other door layer colliders, now you can walk into the door to open it
@SpeedTutor
@SpeedTutor Жыл бұрын
Thanks for your tips, my friend! That could be a great help for some people! :)
@sillyninja65
@sillyninja65 Жыл бұрын
jesus christ thats alot of extra steps
@sillyninja65
@sillyninja65 Жыл бұрын
i just used a sphere collider with gravity unchecked, works just fine! cheers!!
@zoodolosgamesfnf
@zoodolosgamesfnf 5 ай бұрын
thanks i was having problem with this
@dunderguy
@dunderguy 2 жыл бұрын
Thanks :) (For anyone who's having trouble walking into the door then the door not opening while walking out, in the Limits tab, set Max to 90 instead of 0
@scratchy996
@scratchy996 4 жыл бұрын
Finally, I can make my treasure chests open ! :)
@SpeedTutor
@SpeedTutor 4 жыл бұрын
Haha, good luck! Enjoy!
@insaneduane
@insaneduane 2 жыл бұрын
Thank you very much for this tutorial. Short and concise with the exact info I was looking for. Perfect for NPC's walking through doors.
@SpeedTutor
@SpeedTutor 2 жыл бұрын
You're very welcome! I'm glad you found it helpful! :D
@Slu2112
@Slu2112 Жыл бұрын
great tutorial i was looking for this and i want to be able to unlock, close and lock it again from the inside
@SpeedTutor
@SpeedTutor Жыл бұрын
I have a door interaction kit on the asset store, it doesn't use a hinged door but could help you out.
@sxsignal
@sxsignal Жыл бұрын
that was most helpful! using a hinge joint, I've been using empty game objects and ting based off another video.
@TheZiver
@TheZiver 2 жыл бұрын
thanks now I can make cool doors
@SpeedTutor
@SpeedTutor 2 жыл бұрын
Awesome, great to hear it! :D
@magisoftworks8547
@magisoftworks8547 3 жыл бұрын
Great Vid! Question- I have Bar (Salon) Swinging doors , they work great but any idea on how to get them to "end up" in original Transform position after the swinging like a real old time salon? Thanks!
@SpeedTutor
@SpeedTutor 3 жыл бұрын
That's a really good question, I'm not sure about that one. Maybe there is a way to tell when the hinge joint isn't moving and you can move them back to the original rotation? Have you thrown this into Google?
@magisoftworks8547
@magisoftworks8547 3 жыл бұрын
@@SpeedTutor I actually never did salon doors so didnt think about them having to meet together at end of swing(s). :) for right now I did what you thought of - When swing stops, change time (slow) and move to original Transform position but definitley doesnt look natural. lol Let me think about it and I'll let ya know what I come up with. Thanks again for all your vid's!
@magisoftworks8547
@magisoftworks8547 3 жыл бұрын
Ah- Set Damper => 12 , Spring => 49 and Rigid angular drag => 0 - They swing and close together now. Cool
@SpeedTutor
@SpeedTutor 3 жыл бұрын
That's amazing stuff, thanks very much for sharing! I'm glad you managed to work this out! :D
@insaneduane
@insaneduane 2 жыл бұрын
@@magisoftworks8547 Thank you. I changed the the damper to 1 to give the door some back and forth action when closing.
@fraiva22
@fraiva22 11 ай бұрын
Tag: InteractiveObject is not defined. UnityEngine.Component:CompareTag (string) DoorRaycast:Update () (at Assets/Scripts/DoorRaycast.cs:31)
@SpeedTutor
@SpeedTutor 11 ай бұрын
Make sure the tag has been created and it's the same name as it's looking for :)
@just_purplecz6035
@just_purplecz6035 Жыл бұрын
I love this channel
@SpeedTutor
@SpeedTutor Жыл бұрын
Thanks very much for coming along! :D
@euanpc3322
@euanpc3322 Жыл бұрын
how can I make the door close itself after youve walked through it?
@SpeedTutor
@SpeedTutor Жыл бұрын
You can have a collider at the other side which plays the animation to close it :)
@SeLineStudio
@SeLineStudio 4 жыл бұрын
great tutorials thank you for it
@SpeedTutor
@SpeedTutor 4 жыл бұрын
No problem at all! :)
@SeLineStudio
@SeLineStudio 4 жыл бұрын
@@SpeedTutor Could you actually make a tutorial on controlling character controller sliding amount after releasing forward button? i really couldnt find anything helpful that i would understand
@charliemossop4057
@charliemossop4057 3 жыл бұрын
very good! exactly what i needed. And only 7 mins!
@SpeedTutor
@SpeedTutor 3 жыл бұрын
Glad you liked it! :D
@SirCuddlesWorth
@SirCuddlesWorth 11 ай бұрын
Thanks, how do I make a door sound when you push it open? I tried searching and it seems not to be a thing I hate how silent it is.
@RebootedGaming
@RebootedGaming 4 жыл бұрын
Can you make a door that combines two ways of opening? Either fully open normally with just a click, or hold and drag to open slowly while moving forward (so a la Amnesia)
@SpeedTutor
@SpeedTutor 4 жыл бұрын
Haha, I'll see what I can do! :)
@CodeConnor
@CodeConnor 3 жыл бұрын
Did this ever get answered???
@ziadmouad5889
@ziadmouad5889 2 жыл бұрын
@@CodeConnor Did this ever get answered???
@CodeConnor
@CodeConnor 2 жыл бұрын
@@ziadmouad5889 I did but it was so long ago. I just made my own system that uses rotations of the door to run it when dragged
@darealspawn
@darealspawn 2 ай бұрын
How to make it spin around then slowly slow down to stop on certain position ? Keep up your good work
@SpeedTutor
@SpeedTutor 2 ай бұрын
What are you trying to create?
@CyberStudios
@CyberStudios 3 жыл бұрын
Excellent video, had the wild swinging issue
@SpeedTutor
@SpeedTutor 3 жыл бұрын
Haha, glad I could help! :)
@DarkHeliosGamesInteractive
@DarkHeliosGamesInteractive 2 жыл бұрын
Exactly what I was looking for nice video mate
@SpeedTutor
@SpeedTutor 2 жыл бұрын
I'm glad you found it helpful! :D
@chezcakes7166
@chezcakes7166 3 жыл бұрын
how do I make the door swing back into its original closed position after its been pushed?
@stealthcat_OxO
@stealthcat_OxO 3 жыл бұрын
You could enable the “Use Springs” on the hinge joint component and assign some low value to it.
@ninjastorm4524
@ninjastorm4524 Жыл бұрын
Can you make a tutorial to add a moving sound when the door opens and a closing sound when the door moves closed🙏🏼🙏🏼🙏🏼
@FlashySenap
@FlashySenap Жыл бұрын
How to do this In Bonelabs SDK? preferbly for things like locker doors?
@SpeedTutor
@SpeedTutor Жыл бұрын
When it comes to the specific functionality related to that product, I'm really not sure. I'm sorry I can't be of more service but I've never used it. :(
@monstrositydnb
@monstrositydnb 3 жыл бұрын
Thanks for the vid bro
@SpeedTutor
@SpeedTutor 3 жыл бұрын
Any time!
@christianmuller7919
@christianmuller7919 Жыл бұрын
Very good and compacat, but there is one mistake: If you want the axis to be vertical, then you set x=0 and z=1 and not z=90 while keeping x=1. (because then if would be still slighty off the vertical axis)
@SpeedTutor
@SpeedTutor Жыл бұрын
Thanks for giving out some pointers! :)
@jedzk
@jedzk 3 жыл бұрын
MY PIVOT is always in the middle. how do i change that
@Dark_Art_Space
@Dark_Art_Space Жыл бұрын
Very THANKS!!!
@SpeedTutor
@SpeedTutor Жыл бұрын
You're very welcome! :)
@Dark_Art_Space
@Dark_Art_Space Жыл бұрын
@@SpeedTutor ok :) suscribed!
@D4780896526
@D4780896526 Жыл бұрын
Whenever I tap the door very lightly it swings as if it was flung open by an unseen force I'm currently messing with the weights but I'm not sure where to start, I already fixed my other issue for the time being of the door acting as a old west door
@SpeedTutor
@SpeedTutor Жыл бұрын
Did you adjust the weight and force?
@D4780896526
@D4780896526 Жыл бұрын
@@SpeedTutor I just adjusted the mass of the door and it seems to work better than before so thank you for that but I have come across another issue since I combined the hinge joint and then added my own script to rotate the door to a specific degree before allowing it to act on the hinge to be interacted by the player. The rotation when interacting with the door seems to fight the hinge joint so it looks like my door is stuttering until it reaches the specified angle I set in the inspector then it acts normal
@gar98k
@gar98k 3 жыл бұрын
Do you know how to add door sound effect on this? I couldn't find the tutorial for it
@SpeedTutor
@SpeedTutor 3 жыл бұрын
I don't have a tutorial on it but I do have it on my list to cover! :)
@gar98k
@gar98k 3 жыл бұрын
@@SpeedTutor Thank you, I was trying to copy the door method from re village 👍
@iohellemans3280
@iohellemans3280 3 жыл бұрын
Great video it helped
@SpeedTutor
@SpeedTutor 3 жыл бұрын
Glad to hear it! :)
@mewjam
@mewjam 2 жыл бұрын
how did you move the door's pivot to the side to match the hinge anchor?
@SpeedTutor
@SpeedTutor 2 жыл бұрын
I clicked on the little anchor button for the pivot.
@F0r3v3rT0m0rr0w
@F0r3v3rT0m0rr0w 3 жыл бұрын
So At some time they have updated this and now have something called a Connected Articulation option under connected body (unless its an asset i have messing with it?) the documentation does not even talk about this, i follow your guide and my door doesnt move so i am wondering if its that thats screwing it up.
@SpeedTutor
@SpeedTutor 3 жыл бұрын
Unity usually like to add things that they don't tell you about, haha. What version of Unity are you using? I'll look into what is happening on my end! :)
@F0r3v3rT0m0rr0w
@F0r3v3rT0m0rr0w 3 жыл бұрын
@@SpeedTutor version 2020.3.17f1 cheers for that
@F0r3v3rT0m0rr0w
@F0r3v3rT0m0rr0w 3 жыл бұрын
@@SpeedTutor so i was experimenting to find out what my issue was, and for some reason the Hinge does not collide with my character controller. or any capsule controller. so it might be something ive done ... or something else not sure.
@dan.lespect
@dan.lespect 3 жыл бұрын
Thanks man, Hinge joint is what I was looking for
@ThatLazyGameDev
@ThatLazyGameDev 2 жыл бұрын
Is it also posible for the door to close after player entered? Like after being opened slowly go back to close
@SpeedTutor
@SpeedTutor 2 жыл бұрын
Maybe if you increase the spring value? I'm not sure about that one.
@therealcamk
@therealcamk 3 жыл бұрын
Got a question for you, how do I make the door have "weight"? Walking straight into the door just makes it fly open. Working with IK and handplacement on walls/doors, so I just need to make it a bit "slower". Changing the mass does practically nothing.
@SpeedTutor
@SpeedTutor 3 жыл бұрын
I can't recall off the top of my head but I'm sure there was something that made this happen. Does it have a friction option?
@RyanJhider
@RyanJhider 3 жыл бұрын
Hello you trying to reproduce the door of resident evil 7 ?
@jonnysgames6492
@jonnysgames6492 3 жыл бұрын
the answer is to increase the mass scale.
@JuniorDjjrMixMods
@JuniorDjjrMixMods 2 жыл бұрын
Rigidbody mass and spring damper (if you use spring).
@tubble3058
@tubble3058 2 жыл бұрын
The door just wont open when I walk into it not sure what goin on
@SpeedTutor
@SpeedTutor 2 жыл бұрын
Do you have a rigidbody? Or the weight of the player not enough?
@tubble3058
@tubble3058 2 жыл бұрын
@@SpeedTutor ye I changed the weighting and that fixed it but its not that smooth its a bit buggy
@rezgui_aziz
@rezgui_aziz 4 жыл бұрын
Thanks brother
@SpeedTutor
@SpeedTutor 4 жыл бұрын
No worries at all, thanks for watching! :)
@DavidEclipse
@DavidEclipse 4 жыл бұрын
Nice bro
@SpeedTutor
@SpeedTutor 4 жыл бұрын
Thanks man! :)
@sneirox
@sneirox 3 жыл бұрын
How did you do pushable character?
@SpeedTutor
@SpeedTutor 3 жыл бұрын
It's just from the Unity standard assets! :)
@HappyScarySad
@HappyScarySad 3 жыл бұрын
Finally someone who gives the correct answer to a upgradeable function 🙏🏻🙌🏻
@SpeedTutor
@SpeedTutor 3 жыл бұрын
I'm glad I could help! Haha.
@iwayannararyapramana8788
@iwayannararyapramana8788 4 жыл бұрын
Nice tutorial next can you make door like pamali games style
@SpeedTutor
@SpeedTutor 4 жыл бұрын
Can you give me an example?
@iwayannararyapramana8788
@iwayannararyapramana8788 4 жыл бұрын
@@SpeedTutor kzbin.info/www/bejne/bGnOlYWHds-An7M At 0:40, i like your channel.
@Justin-nw7xi
@Justin-nw7xi 4 жыл бұрын
@@iwayannararyapramana8788 kzbin.info/www/bejne/q5nZo6l4mceUhpY check this tutorial
@iwayannararyapramana8788
@iwayannararyapramana8788 4 жыл бұрын
@@Justin-nw7xi thanks vine
@RyanJhider
@RyanJhider 3 жыл бұрын
Hello sir can you made a vidéo to explain how to made a door like the game Resident Evil 7 ( you click once to open a little and after that you push with your body with the hand who push the door (maybe inverse kinematic) )
@SpeedTutor
@SpeedTutor 3 жыл бұрын
I was actually making something like that a while ago, I'll see what I can do! :)
@RyanJhider
@RyanJhider 3 жыл бұрын
@@SpeedTutor thx 🙏
@Shubham-bk2cf
@Shubham-bk2cf 4 жыл бұрын
Next Lock Door Tutorial :)
@SpeedTutor
@SpeedTutor 4 жыл бұрын
Will do! ;)
@cancandan4327
@cancandan4327 2 жыл бұрын
How can i make the door close faster and more stable ?
@SpeedTutor
@SpeedTutor 2 жыл бұрын
Turn the play speed up? :o
@iHighPointz
@iHighPointz 3 жыл бұрын
Non-convex MeshCollider with non-kinematic Rigidbody is no longer supported since Unity 5. Bro how can ı fix this ?
@SpeedTutor
@SpeedTutor 3 жыл бұрын
You can actually get an asset for this on the Unity store! :)
@iHighPointz
@iHighPointz 3 жыл бұрын
@@SpeedTutor I Fixed already bro but thanks for the answer
@euanpc3322
@euanpc3322 Жыл бұрын
how can I lock this type of door?
@SpeedTutor
@SpeedTutor Жыл бұрын
You could make the door really heavy, so it's not moveable? :)
@KappKee
@KappKee 3 жыл бұрын
Man, I was hoping to find something like the doors from amnesia or phasmophobia. Great video, tho!
@SpeedTutor
@SpeedTutor 3 жыл бұрын
How do those doors work? And thanks! :)
@KappKee
@KappKee 3 жыл бұрын
@@SpeedTutor Imagine a raycast as an invisible arm. You could then hold left mouse button to drag open a door.
@SpeedTutor
@SpeedTutor 3 жыл бұрын
I see what you mean! I'll note this down! :)
@ELPIRATATUQUE
@ELPIRATATUQUE 3 жыл бұрын
Awesome!!
@SpeedTutor
@SpeedTutor 3 жыл бұрын
Thanks very much for checking this out! :D
@RonkleBonk
@RonkleBonk Жыл бұрын
this doesn't work. the character controller just pushes up against the door and it doesn't move. what controller as you even using? i downloaded the starter assets one from the assets store and it doesn't work.
@SpeedTutor
@SpeedTutor Жыл бұрын
I haven't used the starter one but you might need to edit the weights and forces for each :)
@radbradboy2319
@radbradboy2319 4 жыл бұрын
No matter what I do with the hinge limits, the player can still break/glitch the door past its limit and it spazzes out, I tested on my own project and in your project here, both can glitch if you just push/slide against the door at its hinge limit position :( how do i make the limit totally rock solid even against the kinematic player pushing against it? I tried all variations of using colliders to block it, still glitches through the wall etc :(
@JuniorDjjrMixMods
@JuniorDjjrMixMods 2 жыл бұрын
I spent days of work trying to solve this exact problem, until I learned that this is about your character colliders, not hinge settings. For example your character moves with physics but is holding a weapon, the collision of that weapon will cause this bug, you need to make the weapon ignore the door collision for example. I NEVER found this solution when searching it, it's amazing.
@RicardoMetring
@RicardoMetring 2 жыл бұрын
I had the same problem. It happens that the hinge joint physics requires more calculations per second for it not to glitch. Two things that can fix this: 1. Edit > Project Settings >Time > Change "Fixed Timestep" from 0.02 to 0.01 (or even 0.005) Performance might be affected. 2. On the hinge joint, add a connected body of another rigid body fixed joint door frame with iskinematic enabled.
@StigDesign
@StigDesign 4 жыл бұрын
Pretty Cool :D nowi understand the Hinge system :D Might make cowboy doors in my Car racing game am working on hehe :D my fps is on Pause :D
@SpeedTutor
@SpeedTutor 4 жыл бұрын
Haha, what a good idea! :P
@StigDesign
@StigDesign 4 жыл бұрын
@@SpeedTutor :D
@hafidrisqina749
@hafidrisqina749 Жыл бұрын
Why is my door falling? Solution bro plz
@SpeedTutor
@SpeedTutor Жыл бұрын
Does it use gravity?
@kemil4658
@kemil4658 3 жыл бұрын
When I open a door it keeps going until it finds a limit and then goes to the opposite direction until it finds the other limit and so on
@SpeedTutor
@SpeedTutor 3 жыл бұрын
You need to limit the strength of it, I'm sure I mention in the video! :)
@1ksubscriberswithoutavideo167
@1ksubscriberswithoutavideo167 4 жыл бұрын
Hi,so I know that this might not be the perfect way to ask this But,please could you make a tutorial for custom health bars (like some sci fi or fantasy ),motorcycle implementation in unity The other tutorials are quite not understandable Thanks:D
@SpeedTutor
@SpeedTutor 4 жыл бұрын
I do have a tutorial on creating a health bar but I can look at making some normal health bars! :)
@1ksubscriberswithoutavideo167
@1ksubscriberswithoutavideo167 4 жыл бұрын
Thanks for considering it :D You are the only creator who considers the tutorials for what people think The rigidbody door is by far the best for me :) I like it a lot
@Aghhhhhhhhh83
@Aghhhhhhhhh83 2 жыл бұрын
Guys, the door moves randomly, how do I fix this :D
@SpeedTutor
@SpeedTutor 2 жыл бұрын
Did you constrain the door correctly?
@Aghhhhhhhhh83
@Aghhhhhhhhh83 Жыл бұрын
@@SpeedTutor im not surethat im did that correctly but if you can create a new project and mabe this door & send it to me i can mybe solve the problem
@bhanu4923
@bhanu4923 3 жыл бұрын
Noice..!!!
@SpeedTutor
@SpeedTutor 3 жыл бұрын
I hope it helped! :)
@cy4n_knight_q8
@cy4n_knight_q8 2 жыл бұрын
It's really hard to watch this on a phone. Everything is barely clear enough to see lol
@SpeedTutor
@SpeedTutor 2 жыл бұрын
I'd highly recommend watching on a bigger screen! Haha. Tricky to make code visible on mobile.
@chadm6777
@chadm6777 4 ай бұрын
Didn't work. Coding a transform rotation is far less of a hassle.
@SpeedTutor
@SpeedTutor 4 ай бұрын
I agree with you! Haha.
@zdxqi_8941
@zdxqi_8941 2 жыл бұрын
dislike the display of screen is soo small i cant see anything
@SpeedTutor
@SpeedTutor 2 жыл бұрын
Sorry about that, there isn't much I can do about this. My only recommendation is that you play the video in fullscreen :)
@2PACBRB2014
@2PACBRB2014 Жыл бұрын
It doesn't work
@SpeedTutor
@SpeedTutor Жыл бұрын
I can't try and help without more information? :)
@valentainx2612
@valentainx2612 3 жыл бұрын
text on screen super small, not everyone has 30 inch 4k monitor
@SpeedTutor
@SpeedTutor 3 жыл бұрын
Nor do I, there isn't much I can do about the size of Unity's UI text because if I do make it larger - It's just unusable.
@valentainx2612
@valentainx2612 3 жыл бұрын
@@SpeedTutor okay then
4 ай бұрын
How can we do this on Third Person Controller
@SpeedTutor
@SpeedTutor 4 ай бұрын
It should work with a third person controller, as long as it has a collider on it :)
4 ай бұрын
@@SpeedTutor Thank you
@iMikOo
@iMikOo Жыл бұрын
How can we add sound to the door?
OPENING a DOOR in UNITY on TRIGGER EVENT
8:20
SpeedTutor
Рет қаралды 119 М.
When you have a very capricious child 😂😘👍
00:16
Like Asiya
Рет қаралды 18 МЛН
REAL or FAKE? #beatbox #tiktok
01:03
BeatboxJCOP
Рет қаралды 18 МЛН
Правильный подход к детям
00:18
Beatrise
Рет қаралды 11 МЛН
I Made the Same Game in 8 Engines
12:34
Emeral
Рет қаралды 4,3 МЛН
Unbelievable $1 Assets! (Unity's Dec 24 Mega-Bundle)
8:44
SpeedTutor
Рет қаралды 4,9 М.
OPENING a DOOR in UNITY with a RAYCAST
18:18
SpeedTutor
Рет қаралды 55 М.
Can BUILD PROFILES Help You In Unity 6 (Build Profiles Tutorial)
5:36
Физика в Unity - 10. Joint
37:20
Eccentric Games
Рет қаралды 74 М.
Create A BREATHTAKING 3D Level In Unity (In 6 mins)
5:38
Thomas Brush
Рет қаралды 16 М.
How To Create Beautiful Terrain Under 10 Mins In Unity | Tutorial | HDRP |
7:47
90+ AWESOME FREE Unity Assets (December 2024 - Asset Store)
4:45
When you have a very capricious child 😂😘👍
00:16
Like Asiya
Рет қаралды 18 МЛН