Doors That Open Away From You- Unreal Engine 4

  Рет қаралды 21,334

Cobb Dev

Cobb Dev

Күн бұрын

Пікірлер: 98
@LionKings
@LionKings 5 жыл бұрын
wow this came out faster than i thought! awesome thank you!
@mapelsiroup5604
@mapelsiroup5604 5 жыл бұрын
would it be possible to make so if the door collides with something it stops mid way?
@thesensur6214
@thesensur6214 5 жыл бұрын
You could probably use actor begin overlap to do something like this
@mapelsiroup5604
@mapelsiroup5604 5 жыл бұрын
@@thesensur6214 oh yeah right but how would i got about stopping the timeline well idk so ill go check ;) thx bud
@Nozera
@Nozera 2 жыл бұрын
Hey! i can't find "vector - vector". I think because of ue5. What should i do?
@alexamos
@alexamos 2 жыл бұрын
Use "Subtract"
@Alaa_alshahed
@Alaa_alshahed 3 жыл бұрын
why when i pass through the door directly the door reverse to the other side not staying as it is? :(
@GBTC2011
@GBTC2011 3 жыл бұрын
Door opens sometime away and sometime towards character for no reason.
@DirectionGaming
@DirectionGaming 3 жыл бұрын
How to implement this using Box collision insted of linetrace
@ChrisVlogX
@ChrisVlogX 4 жыл бұрын
I want to use a different Input such as E but it's not working. How can I change it
@CobbDev
@CobbDev 4 жыл бұрын
At 7:48 I search for "input left mouse button". Instead, search for "input e". You might have to scroll a bit to find it.
@ChrisVlogX
@ChrisVlogX 4 жыл бұрын
Cool Thanks It Worked 👍, Love your videos bro, keep it up.
@GrandmasterPanch
@GrandmasterPanch 3 жыл бұрын
Hi! I keep having an issue with the "dot product". It throws me an error "accessed none trying to read property". I believe the Player Ref has no value. Any idea how to solve that?
@CobbDev
@CobbDev 3 жыл бұрын
It means your player reference variable isn't set to anything. Check 2:31 to make sure you did the BeginPlay right
@GrandmasterPanch
@GrandmasterPanch 3 жыл бұрын
@@CobbDev I remade that part following your video and still get the same message :( I'm using a ThirdPerson Character. Do you think I have to do anything different (any variable, character camera, etc) for the ThirdPerson to work with your example?
@АлижанОрынтаев
@АлижанОрынтаев 3 жыл бұрын
hey, great tutorial, it was very helpful. but, i've got some issues with door's opening, it's not opening all the time, i mean it opens well, but for closing i have to click several times, is there any place where i have to navigate or something???
@Vendaar
@Vendaar 2 жыл бұрын
I noticed this too. You have to change to default value of your "IsDoorClosed" boolean to negative.
@kelvinhuurman4247
@kelvinhuurman4247 5 жыл бұрын
Could u make a video how to add weapons to a third person character?
@torstaken
@torstaken 2 жыл бұрын
Is there a way I can add physics to it? For example if I get in the way it stops but when I move out of the way, it continues until it opens/closes?
@Mdogg2005
@Mdogg2005 2 жыл бұрын
So say we wanted to use the same action mapping to allow us to open door, pick up item, push a button, etc. How do we go about doing that? With this system all line trace is converted to BP actor and calls the OpenDoor function.
@KamikazeXeX
@KamikazeXeX 2 жыл бұрын
The way to do this would be implement a blueprint interface on your "interactible" actors with a generic "interact" function and and call that function if the interface is implemented on the actor from the line trace instead of casting to a specific actor and calling *some* specific function.
@Hyper
@Hyper 3 жыл бұрын
How would you alter this to open on a box collision rather than pressing a button? so the door is automatic
@CobbDev
@CobbDev 3 жыл бұрын
Add a box collision to the door, make it as big as you want for the automatic detection, create the OnOverlap event for the box, from there do the dot product calculation. You can cut out the line trace entirely.
@Lusiogenic
@Lusiogenic 5 жыл бұрын
Awesome stuff, thanks!
@incenseman6650
@incenseman6650 2 жыл бұрын
This is a great tut. I realize this is a very old post and that I may not get an answer. I need to ask this question. If I want the door to open by having the player walk into a trigger box on each side of the door instead of using the left mouse key, How would I do that? I tried simply adding a trigger box but that did not work. Is there a way to make that work?
@CobbDev
@CobbDev 2 жыл бұрын
Use a trigger box, and upon entering the trigger box run the line trace from the character to the door, have it go through all the rest of the code (using the dot product to figure out the rotation and then rotating it)
@salilupadhyayaryan
@salilupadhyayaryan 2 жыл бұрын
This is a good Tutorial. But I am facing a problem when I try to use the event tick to check whether the distance is getting calculated or not. (03:44) my distance is not updating and I am getting an error. the door is only opening on one side. (Blueprint Runtime Error: "Accessed None trying to read property PlayerRef") Please help me if you can.
@ex_S1N
@ex_S1N Жыл бұрын
Yea, I'm getting the same error. You ever figure it out?
@ex_S1N
@ex_S1N Жыл бұрын
Figured it out. Make sure that wherever your "Cast to character" logic is, the beginning of that code should start with "Event BeginPlay," and not something else.
@MustafaDagdelen
@MustafaDagdelen 3 жыл бұрын
thank you but movable mesh not light building (gpu lightmass) how do fix
@CyberpunkV2077
@CyberpunkV2077 5 жыл бұрын
Great tutorial, many thanks
@dylomusic9478
@dylomusic9478 4 жыл бұрын
Hey man thank you so much for this vid. Thorough explanation and super fast. I had a question though. Is there a way I can adjust where I have to click when opening the door? I'm in the third person template and currently, I have to face the camera to the side of the door respective to the pivot point, rather than square in front of me. Thank you in advance, I hope to hear back soon.
@kevinlong5104
@kevinlong5104 3 жыл бұрын
@@pgWave. not working for me...
@artmaknev3738
@artmaknev3738 4 жыл бұрын
Can you add sound to closing and opening?
@789alizaidi
@789alizaidi 4 жыл бұрын
this did the trick amazing tutorial thanks cobb day you're amazing
@robertbrough2296
@robertbrough2296 3 жыл бұрын
For anyone having problems with the door rotating too fast check your timeline is set from 0 to 1 rather than 0 to 90. For anyone having issues with the door not opening away from them, use "get right vector" instead of "get forward vector" for the camera.
@rycrft
@rycrft 3 жыл бұрын
How do I set the timeline from 0 to 1?
@kevinlong5104
@kevinlong5104 3 жыл бұрын
Nope doesn't work, after added "Get right vector" the door won't even open
@Upaleo92
@Upaleo92 2 жыл бұрын
Thanks Man!!!!!
@Zeuzdelaluz
@Zeuzdelaluz 4 жыл бұрын
Great video thanks! For anyone having issues with the door not opening the right way. Check and make sure that your Scene root is the parent of your "Door frame" and that your door frame is the parent of your door. And one last thing you can do if it's opening towards you instead of away from you is inverting the values on your select float node. So instead of the 90 being on top, make it go on the bottom and make the -90 go on top. I hope this helps !
@kevinlong5104
@kevinlong5104 3 жыл бұрын
nope it still opens toward the player...
@Andrei1744
@Andrei1744 2 жыл бұрын
Mate you just solved my problem
@Zeuzdelaluz
@Zeuzdelaluz 2 жыл бұрын
@@Andrei1744 Glad I could help! God bless you brother =)
@AnikenSkiwalker
@AnikenSkiwalker 3 жыл бұрын
Why are you using the dot product?
@CobbDev
@CobbDev 3 жыл бұрын
It's the fastest way to find which side of the door we're on, since it gives us a value from 1 to -1
@ramdion
@ramdion 4 жыл бұрын
We can't shoot through the door,right?can you make that possible...tks.😊👍
@sweatmandella1725
@sweatmandella1725 4 жыл бұрын
so i found this really easy to follow. but right now im using HorrorEngine. which has it's own doors sound effects etc.. when i try applying this to that engine it doesnt really work. maybe im casting to the wrong character? do you have any videos about horror engine?
@CobbDev
@CobbDev 4 жыл бұрын
Sweat mandella I've never used horror engine, but maybe try just using the door mesh and making your own actor rather than altering the door actor it comes with. If that is what you're doing and it still doesn't work, the issue is probably the mesh, so make sure it has proper collision.
@sweatmandella1725
@sweatmandella1725 4 жыл бұрын
@@CobbDev no i made it from scratch following your every move, i'm thinking its the casting to character. but i will stick to the default for now. great video though man. appreciate the reply.
@vkp2506
@vkp2506 4 жыл бұрын
Hey man would be great if u reply what do i do? I done everything u shown me here but when i satrt the game the door spins really fast and then stops in a fixed position. What do i do?
@daifee9174
@daifee9174 4 жыл бұрын
same issue
@robertbrough2296
@robertbrough2296 3 жыл бұрын
Chances are your timeline isnt right. Its moving from 0 to 1.
@vkp2506
@vkp2506 3 жыл бұрын
@@robertbrough2296 I kinda fixed my problem 3 months ago...
@robertbrough2296
@robertbrough2296 3 жыл бұрын
@@vkp2506 Posting how you fixed it would help others in the same position mate.
@timsonss
@timsonss Жыл бұрын
@@robertbrough2296 yes
@AhriCRose
@AhriCRose 4 жыл бұрын
Oh man, this is awesome, thank you :D
@mehmetbaspinar25
@mehmetbaspinar25 4 жыл бұрын
my door open one direction how fix it ?
@leviathan789
@leviathan789 4 жыл бұрын
Hey I was wondering if there is a way to keep everything just add a few things to make it automatic so when you step within the trigger box instead of clicking it just opens. I've tried to use it but add in my own thinking havent gotten it to work yet but I'm sure there is a way. I already got it to work with my double door.
@CobbDev
@CobbDev 4 жыл бұрын
Hazey Legend I would have 1 trigger box big enough to cover both sides of the door. Once you overlap the box, use a line trace and the dot product technique to choose which way the door opens. Once you leave the trigger box, close the door. I might actually make a video on this
@leviathan789
@leviathan789 4 жыл бұрын
@@CobbDev a video would be very helpful plus there is definitely no video showing how to make a automatic door that opens outwards on both sides. I've checked a lot. I understand what you are saying and will try it out
@leviathan789
@leviathan789 4 жыл бұрын
@@CobbDev I am actually making it for the ark dev kit which obviously still runs the same version of unreal and is for the most part exactly the same besides I choose cast to shooter character instead of any of the others so I'm more looking into a way to make it all within the bp class itself and not into the character at all because the clicking method wouldnt be very good for ark. I've been making a huge mod for about 4 months now and the video plus a couple other of your videos have helped a lot that's why I was hoping to kinda have your advice for this and get it worked out.
@mehmetcansarmen7036
@mehmetcansarmen7036 3 жыл бұрын
Can you help me about how did you get it to work with your double door? i have double door too but i couldn't do that
@HawkinsBrosGaming
@HawkinsBrosGaming 4 жыл бұрын
At 4:00 when I test this 0 seems to be at a completely different location than where the door is at. I've got everything working apart from this part, the door opens well, just not away from me and only in one direction. I've got over the video multiple times but I can't see where I have gone wrong. Seems the world location of my door is wrong?
@CobbDev
@CobbDev 4 жыл бұрын
Maybe your door isn't at the center of your actor? "0" will be at the exact center of the actor, not the meshes
@HawkinsBrosGaming
@HawkinsBrosGaming 4 жыл бұрын
Cobb Dev Thanks for the reply, the mesh is in the centre of the BP actor. I’m using the 3rd person character and have replaced everything correctly. I don’t have a 3rdPersonCharacter placed in the map, im using a GameStart to spawn instead, could that cause an issue?
@CobbDev
@CobbDev 4 жыл бұрын
@@HawkinsBrosGaming Ah, I think the issue is that since you're using the third person character and the camera is the start of the line trace, that's what's being tracked as which side the of the door you're on, not your mesh. Does just rotating your camera around change the dot product value?
@HawkinsBrosGaming
@HawkinsBrosGaming 4 жыл бұрын
Cobb Dev I’m not too sure, I am currently at work and I can’t check yet. Once I get home I’ll update you if that’s alright. Again, thanks for actually helping.
@HawkinsBrosGaming
@HawkinsBrosGaming 4 жыл бұрын
@@CobbDev Just tested it, rotating the camera doesn't change the dot product value.
@dineshraj78
@dineshraj78 4 жыл бұрын
ohh great one, damn quick!!
@WowPlusWow
@WowPlusWow 3 жыл бұрын
There is a huge problem with your logic. If you open the door, then close it and while its closing move to the other side and open it, the door will snap back to the 0.0 rotation. This implementation is flawed.
@WallesWillerWalla
@WallesWillerWalla 3 жыл бұрын
You must have missed a step in the implementation. For testing I set the timeline to 10 seconds, and tried to replicate what you wrote, but was not able to. If I do as you say, open the door, then close it and move around it to try to open it while it's moving, it's not snapping at all, it just continues to close. And it shouldn't start to open towards you, as it's supposed to always open away from you. Edit: You probably forgot to actually set the dot product variable. If you don't set it, but just use it as it's being calculated, it'll recalculate all the time while the door is opening or closing.
@svenrawandreloaded
@svenrawandreloaded 4 жыл бұрын
is there a way to have the door auto close after a delay?
@faymantaray
@faymantaray 3 жыл бұрын
Add a box collision in the viewport and send the 'on component end overlap' node to the reverse of the timeline via a delay node.
@timsonss
@timsonss Жыл бұрын
there is literally a delay node
@chrisdoodle9426
@chrisdoodle9426 4 жыл бұрын
I dont know how to get it to Cast to BP_Door i dont have that ?
@CobbDev
@CobbDev 4 жыл бұрын
Are you sure that you're searching for the correct name? If you named it something other than BP_Door you'll have to search for that. Also, make sure you're taking it from Hit Actor and your BP_Door is compiled.
@chrisdoodle9426
@chrisdoodle9426 4 жыл бұрын
@@CobbDev What is Bp_Door anyways that would prob help me?
@CobbDev
@CobbDev 4 жыл бұрын
Chris doodle BP_Door is the actor we create in the beginning, it's the blueprint we create that has the door mesh and all the code we make for the door. (When we right click, create blueprint, and choose actor)
@chrisdoodle9426
@chrisdoodle9426 4 жыл бұрын
@@CobbDev I figured it out thank you so much.
@ricardobruh
@ricardobruh 5 жыл бұрын
GREAT Tutorial. Very simple and clean. Thank you !
@grazispoint
@grazispoint 4 жыл бұрын
Would be appreciated having sections for this or slower video since KZbin doesn't allow for frame-by-frame rewind/fast forward. Also, having a text version of instructions in Description would be extremely helpful since video has no instructional delays points. Thank you for helping, but seemed too complicated because I had to keep backtracking after blinking.
@jvcnb_off
@jvcnb_off 4 жыл бұрын
yeah would be nice if i could actually follow along, but i guess this is only for people who know how to do this already for some reason
@dreamsprayanimation
@dreamsprayanimation 8 ай бұрын
Thatsh good informashion.
@HiBye-fy7qs
@HiBye-fy7qs 5 жыл бұрын
Timelines Curves Would Be Easy Than This For Opening A Door
@VitorCaldeira1980
@VitorCaldeira1980 3 жыл бұрын
break hit result is missing in ue5
@gjduppessis650
@gjduppessis650 2 жыл бұрын
thx man this helped me alot and it works I would give you 3x the likes if I could
@CitroenGames
@CitroenGames 5 жыл бұрын
pls continue with the cod zombie's series pls
@playerwon5660
@playerwon5660 2 жыл бұрын
am i the only one who tries to move his blueprint around while watching?
@monteme4691
@monteme4691 3 жыл бұрын
Can somebody point me to a beginner tutorial because he moves through this so fast if you don’t know what you’re doing already you don’t have a chance.
@super117knight
@super117knight 5 жыл бұрын
All this for a simple door? Oh my god
@dobei3961
@dobei3961 4 жыл бұрын
You were going mach 1
@chickeninabox
@chickeninabox 4 жыл бұрын
Do you want to see, what I made before this video?
@PeyCraft
@PeyCraft 3 жыл бұрын
I don’t understant
@unknownknownnow143
@unknownknownnow143 4 жыл бұрын
only gat dang tutorial i got to work
@chickeninabox
@chickeninabox 4 жыл бұрын
FPS? You won't make the next best game.
@svenrawandreloaded
@svenrawandreloaded 4 жыл бұрын
@@pgWave. yeah lol what?
Unreal Engine 4 Tutorial - Doors Part 1 - Proximity Doors
18:54
Ryan Laley
Рет қаралды 74 М.
How To Open A Locked Door With A Key - Unreal Engine 4 Tutorial
14:58
IL'HAN - Qalqam | Official Music Video
03:17
Ilhan Ihsanov
Рет қаралды 700 М.
coco在求救? #小丑 #天使 #shorts
00:29
好人小丑
Рет қаралды 120 МЛН
Interactable Doors in Unreal Engine 4
7:20
Cobb Dev
Рет қаралды 28 М.
Unreal Engine is Ruining Video Games
4:43
Studio Reborne
Рет қаралды 693 М.
Unreal Engine AI with Behavior Trees | Unreal Engine
26:38
Unreal Engine
Рет қаралды 365 М.
I Made the Same Game in 8 Engines
12:34
Emeral
Рет қаралды 4,3 МЛН
Iron Lung is not as bleak of a setting as people think(sorry)
19:16
UE4 Tutorial: Footstep Sounds on Different Materials (Request)
9:11
Learn How to Open and Close Doors in Unreal Engine 5
10:07
Gorka Games
Рет қаралды 102 М.
I Remade Star Wars VFX in a Week
10:39
ErikDoesVFX
Рет қаралды 1,6 МЛН
When Your Game Is Bad But Your Optimisation Is Genius
8:52
Vercidium
Рет қаралды 1,5 МЛН