Interacting with Doors | Unity

Interacting with Doors | Unity

Omar A. Balfaqih

5 лет назад

43,643 Просмотров

Ссылки и html тэги не поддерживаются


Комментарии:

Callum Apps
Callum Apps - 14.10.2023 01:03

pls help, whenever i put the door as a child of parent, it moves away, why

Ответить
Mikail
Mikail - 25.06.2023 23:14

its not working can you help me please

Ответить
Mikail
Mikail - 24.06.2023 22:28

how can i download the script ?

Ответить
Ryan Kitchen
Ryan Kitchen - 04.06.2023 19:24

how to i make it say close door when the door is opened?

Ответить
Burst WW
Burst WW - 24.01.2023 02:21

allah loves u

Ответить
Lewis
Lewis - 23.12.2022 16:37

LifeSaver Thank you soo much!!

Ответить
Netherite
Netherite - 06.12.2022 17:44

how to open door with a key ,if you have a key

Ответить
Timmy Dube
Timmy Dube - 06.09.2022 10:28

Is there any way to use that one animator for all the doors. I have been having this issue for so long

Ответить
Rotes Ende
Rotes Ende - 27.07.2022 16:28

i have a problem it still doesent work pls help

Ответить
Milo Jonkman
Milo Jonkman - 27.06.2022 15:33

Wat leg jij het slecht uit! Ga er eens rustig doorheen inplaats van er zo snel door heen te gaan.......

Ответить
Assortment Of Things (Gaming, AI, & Tutorials)
Assortment Of Things (Gaming, AI, & Tutorials) - 14.04.2022 20:06

This tutorial is great, homie. Want to give your short films a looksie too.

Ответить
Hristiyan Aleksandrov
Hristiyan Aleksandrov - 26.03.2022 22:05

Hey, thank you for the tutorial. Unfortunately, I am receiving this error message and don't know how to deal with it.

UnassignedReferenceException: The variable instructions of DoorController has not been assigned.
You probably need to assign the instructions variable of the DoorController script in the inspector.
DoorController.OnTriggerStay (UnityEngine.Collider other) (at Assets/DoorController.cs:17)

Ответить
Esosa Osayamwen
Esosa Osayamwen - 21.03.2022 03:22

I tried to follow you tutorial, but mine doesn't seem to be working. Everytime I click, I get Parameter does not exist.

Ответить
polu ahmed
polu ahmed - 17.03.2022 15:57

the script is not working man i’m pressing e and it does nothing

Ответить
khalil Naser
khalil Naser - 26.01.2022 21:09

ليش عندي لازم أكبس أكثر من مره على e لحتى يستجيب

Ответить
Greenstar Gaming
Greenstar Gaming - 26.11.2021 04:08

Hm, for some reason it only work after a lot of "E" spamming. It randomly starts the animation when I spam the "E" key. The triggering Collider is big enough and it is indeed working. Just.. not all the time

Ответить
Alexus Santiago
Alexus Santiago - 21.11.2021 02:37

My Door opens right as I start the game I have an idle state already set up

Ответить
CopyContender
CopyContender - 08.11.2021 07:11

When I try setting a variable to true in the code where you open the door it doesn’t do that. Any fix?

Ответить
PolyHall
PolyHall - 10.06.2021 03:38

was too fast, hard to explain

Ответить
Karar
Karar - 03.06.2021 19:29

ليش ما ينفتح الباب سويت كل شي قلته في الفيديو

Ответить
Deepro Chakravorty
Deepro Chakravorty - 21.04.2021 18:49

If anyone feels that the interaction button (E here) is a bit unresponsive, that is because physics updates are not aligning with the frame in which you are pressing the button. By default, unity updates physics every 0.02 seconds, and the frame updates every 1/30 seconds. So they might not coincide. To prevent this, reduce the physics updates to 0.005 (From edit > Project Settings > Time > Fixed Timestep). This may be performance hungry, but will reduce the unresponsiveness by a lot. BTW, great tutorial!

Ответить
Morten Hansen
Morten Hansen - 06.04.2021 06:32

That's a start. But it gets a little sloppy in the end.
There needs to be an idle state for the anim not to begin right away.
The instruction sign needs to be false in a private void Start() - 'disable the panel' you say, but you don't show how.
Lokeswaran S comments on that too.
When you go inside and open the door, and then go into the collider again - and the door is open! - it says Click E to open.
Arh c'mon - tutorials should make sense ALL the way. You can do better than that.

Ответить
محترف الألعاب
محترف الألعاب - 31.03.2021 08:45

كيف بدي اغير بدال ما إضغط على حرف E بالكيبورد ويفتح الباب اريد احوله إلى button للموبايل كيف؟

Ответить
Osaid Abuhadi
Osaid Abuhadi - 16.03.2021 18:02

Thank you

Ответить
Asaf Snapiri
Asaf Snapiri - 16.02.2021 11:01

Thank you very much,
this is exactly the explanation I was looking for and you explained it excellently and simply.
Great video!

Ответить
Samanta Poephoofd
Samanta Poephoofd - 23.01.2021 18:54

والله اننا نفتخر فيك ، ياخي البرمجه و الاكواد عجزت اني اطبقها وكملت نص ساعه الا يجي صداع يخليني انام اليوم كله! على العموم ماتقصر حبيبي قلبي والله🙂💘

Ответить
badiiiro
badiiiro - 01.01.2021 16:19

Thank you sir!

Ответить
Lokeshwaran S
Lokeshwaran S - 17.12.2020 15:51

@Omar That UI text is being displayed right from the start of hitting the play button
I want it to display that only when I move the cube near that trigger area
How to remove it being displayed right from the start?
Help please

Ответить
dradil khan
dradil khan - 11.12.2020 10:15

UNITY took everything from Blender? why do i feel so every time i came across unity tutorials

Ответить
Hurka
Hurka - 04.12.2020 17:20

I have a problem :/ When I go to the trigger my character is disappears (Sry for the bad english)

Ответить
UltMate Potato
UltMate Potato - 04.12.2020 15:40

Thx your tutorial helped alot =)

Ответить
Ivan Sarafov
Ivan Sarafov - 02.12.2020 13:24

why so fast what is the point....
\

Ответить
Rasmus Veike
Rasmus Veike - 25.11.2020 20:59

Yeah, way too fast and mine is not working. i know i made a mistake somewhere but idk where. Pls help

Ответить
محمد المشيبي
محمد المشيبي - 13.11.2020 15:04

استمررر الله يسرلك

Ответить
Vyomkesh Gupta
Vyomkesh Gupta - 06.11.2020 11:29

thanks for this tutorial

Ответить
satthu75
satthu75 - 27.10.2020 20:12

really helpful! I like your fast style

Ответить
FEALBEAST
FEALBEAST - 22.10.2020 08:15

why do I have to press E like 5 time for it to open?

Ответить
Squaredium Studios
Squaredium Studios - 06.10.2020 00:51

My door is opening at the start of the game, but when you press e inside the box nothing happens. (I do have a collider and rigidbody) Please help.

Ответить
العدم -nothingness
العدم -nothingness - 08.09.2020 10:40

ياخي اتحرك بطيء شويه

Ответить
Ninedark 9
Ninedark 9 - 28.08.2020 00:13

DoorControler.cs(11,35): error CS1061: 'Collider' does not contain a definition for 'GetComponentChildren' and no accessible extension method 'GetComponentChildren' accepting a first argument of type 'Collider' could be found (are you missing a using directive or an assembly reference?) can you help me?

Ответить
Trillygot
Trillygot - 23.08.2020 03:47

My door becomes super wide whenever I open it and when I close it it goes back to normal plz I need help!

Ответить
FynlX
FynlX - 30.07.2020 17:03

I did everything correctly and the door opens but it teleporst to a different location in game for some reason?

Ответить
Netanel Twito
Netanel Twito - 27.07.2020 06:14

I have 2 problems that I can not solve, I would be happy to help..
1. The door opens before I reach it
2. The code does not work, I get an error.

Error message: NullReferenceException: Object reference not set to an instance of an object
DoorController.OnTriggerStay (UnityEngine.Collider other) (at Assets/DoorController.cs:14)

I would be happy if you could help me.. Thank You

Ответить
GFX RXZ
GFX RXZ - 26.07.2020 13:05

يكتببلي كذا
Cannot implicitly convert type `UnityEngine.Animator[]' to `UnityEngine.Animator"

Ответить
Mubarak Dev
Mubarak Dev - 22.07.2020 14:54

Pro tips use -1 as animation speed to invers animation
......
And you can use raycast to open door

Ответить
The GhiusTher
The GhiusTher - 10.06.2020 07:16

Wow...take it slowly with the scripts mate,some ppl are doing it for the first time,waz soo hard to keep up with you...not fun...

Ответить
Marwan Medhat
Marwan Medhat - 02.06.2020 05:18

omar please can you sent me a link to download script please
FROM EGYPT

Ответить
Saskia & Uludağ
Saskia & Uludağ - 24.05.2020 12:37

Asselamu aleykum. Quick question: If I want my character to grab the door knob and open the door, do I need to do 2 animations? One on the door and one on the player?

Ответить
DIRECT3D
DIRECT3D - 23.05.2020 21:46

Great Tutorial Omar :-)
I'm experiencing an issue with the script. When I'm in game, I sometimes have to press the "E" key up to 3-5 times before it will activate my animation, and other times it works right away… I wonder what causes that problem? oh can you make a tutorial on how to add sound to the animation.. one sound for opening and another for closing the door :-) thank you for your work

Ответить
Riaan Du Toit
Riaan Du Toit - 14.05.2020 00:22

Hey guys, my panel with the "press e to interact" text shows up right away when I hit play even if my player isn't near it. Then when I come close and press e it begins to act normal. How do I fix the panel showing up by default in the start?

Ответить