Тёмный

Doors That Open Away From You- Unreal Engine 4 

Cobb Dev
Подписаться 8 тыс.
Просмотров 21 тыс.
50% 1

Make a survival horror game in 30 days: indiedevguide....
--------------------------------------------------------------------------------
Follow Me:
DISCORD - / discord
TWITCH - / cobbdev
TWITTER - / cobbdev1
TIKTOK - / sprite_vibes

Опубликовано:

 

20 окт 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 98   
@LionKings
@LionKings 4 года назад
wow this came out faster than i thought! awesome thank you!
@Lusiogenic
@Lusiogenic 4 года назад
Awesome stuff, thanks!
@GBTC2011
@GBTC2011 2 года назад
Door opens sometime away and sometime towards character for no reason.
@mapelsiroup5604
@mapelsiroup5604 4 года назад
would it be possible to make so if the door collides with something it stops mid way?
@thesensur6214
@thesensur6214 4 года назад
You could probably use actor begin overlap to do something like this
@mapelsiroup5604
@mapelsiroup5604 4 года назад
@@thesensur6214 oh yeah right but how would i got about stopping the timeline well idk so ill go check ;) thx bud
@CyberpunkV2077
@CyberpunkV2077 4 года назад
Great tutorial, many thanks
@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? :(
@789alizaidi
@789alizaidi 4 года назад
this did the trick amazing tutorial thanks cobb day you're amazing
@kelvinhuurman4247
@kelvinhuurman4247 4 года назад
Could u make a video how to add weapons to a third person character?
@Nozera
@Nozera 2 года назад
Hey! i can't find "vector - vector". I think because of ue5. What should i do?
@alexamos
@alexamos Год назад
Use "Subtract"
@dineshraj78
@dineshraj78 4 года назад
ohh great one, damn quick!!
@AhriCRose
@AhriCRose 4 года назад
Oh man, this is awesome, thank you :D
@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 2 года назад
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 =)
@ricardobruh
@ricardobruh 4 года назад
GREAT Tutorial. Very simple and clean. Thank you !
@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 2 года назад
Nope doesn't work, after added "Get right vector" the door won't even open
@Upaleo92
@Upaleo92 2 года назад
Thanks Man!!!!!
@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?
@DirectionGaming
@DirectionGaming 3 года назад
How to implement this using Box collision insted of linetrace
@MustafaDagdelen
@MustafaDagdelen 3 года назад
thank you but movable mesh not light building (gpu lightmass) how do fix
@АлижанОрынтаев
@АлижанОрынтаев 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.
@JorgePerez-ek5gs
@JorgePerez-ek5gs 2 года назад
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 2 года назад
It means your player reference variable isn't set to anything. Check 2:31 to make sure you did the BeginPlay right
@JorgePerez-ek5gs
@JorgePerez-ek5gs 2 года назад
@@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?
@mehmetbaspinar25
@mehmetbaspinar25 3 года назад
my door open one direction how fix it ?
@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 2 года назад
@@pgWave. not working for me...
@ACDynamic
@ACDynamic 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.
@ACDynamic
@ACDynamic 4 года назад
Cool Thanks It Worked 👍, Love your videos bro, keep it up.
@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)
@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 Год назад
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.
@artmaknev3738
@artmaknev3738 4 года назад
Can you add sound to closing and opening?
@ramdion
@ramdion 4 года назад
We can't shoot through the door,right?can you make that possible...tks.😊👍
@dreamsprayanimation
@dreamsprayanimation 6 месяцев назад
Thatsh good informashion.
@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.
@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
@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.
@gjduppessis650
@gjduppessis650 2 года назад
thx man this helped me alot and it works I would give you 3x the likes if I could
@grazispoint
@grazispoint 4 года назад
Would be appreciated having sections for this or slower video since RU-vid 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.
@RogueTurkey
@RogueTurkey 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
@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.
@vkp2506
@vkp2506 3 года назад
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 3 года назад
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
@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
@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
@HiBye-fy7qs
@HiBye-fy7qs 4 года назад
Timelines Curves Would Be Easy Than This For Opening A Door
@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.
@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.
@CitroenGames
@CitroenGames 4 года назад
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 2 года назад
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.
@VitorCaldeira1980
@VitorCaldeira1980 3 года назад
break hit result is missing in ue5
@super117knight
@super117knight 4 года назад
All this for a simple door? Oh my god
@chickeninabox
@chickeninabox 4 года назад
Do you want to see, what I made before this video?
@PeyCraft
@PeyCraft 3 года назад
I don’t understant
@dobei3961
@dobei3961 4 года назад
You were going mach 1
@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?
Далее
I Made the Same Game in 8 Engines
12:34
Просмотров 4,1 млн
Learn How to Open and Close Doors in Unreal Engine 5
10:07
What’s your height?🩷🙀💚
00:59
Просмотров 3,1 млн
Somebody emailed me a trojan virus
14:06
Просмотров 925 тыс.
How To Never Finish Your Indie Game
4:08
Просмотров 22 тыс.
Why Do Video Game Studios Avoid Blender?
6:49
Просмотров 654 тыс.
Why I’m switching from Unity to Unreal Engine
9:02
Why Solo Developers Should Use Unreal
9:51
Просмотров 402 тыс.
Real-Time Datamoshing in Unreal Looks Mesmerizing
14:31
I Built a Robot that Plays FPS Games
21:23
Просмотров 612 тыс.