Designing A Door In UE4 (A Work In Progress)
In Dr. Heagney's Game Development course, I am currently working on designing a door using the Unreal Engine 4. For my project, I wanted to design two doors that slide away from each other (sliders) when the player approaches the doors. For now, I have learned how to use the collision boxes to help open and then close the door when the player passes through it. Also, the doors don't technically slide just yet but teleport instead. Once I learn how to animate its movement I will make the doors look like they are sliding.
Picture of the door on the front side
First-person view of the front of my door
First-person view of the player opening the door
The Door Problem:
- Can the player open the door?
- Yes, the player can open the door. Currently, the player can open the door by standing in close proximity to the doors due to the collision boxes. When the doors open, the left door will slide to the left side while the other door will slide to the right side.
- What about co-op players? What if player one is standing in the doorway - does that block player 2?
- When I designed the sliding doors, I wanted to keep in mind that if I were to make a door for a co-op player game, I needed to ensure that one player wouldn't be able to block the doorway for the other player (No griefing in my game). So, I designed my doors to be a big enough size where both player one and two can walk through the doorway freely unless it was a four-player co-op game.
- What tells the player a door is locked and will open, as opposed to a door that they will never open?
- I may change how I do it over time, but initially, I was thinking that the doors the player will be able to always open are doors that either has a light-up console that turns from red (locked) to green (unlocked) or an obvious light source that illuminates the door to give players a visual indication that this is the door you can open, go through, and progress.
The Other Door Problems:
- Sound Designers:
- I believe that adding sound effects to a door when it opens or closes can help with the immersion of the game. However, it is important that the sound effect given for the door should be something that isn't annoying or bothersome for the player to hear, it needs to be a satisfactory/pleasing sound.
- Lighter:
- Lighting up a certain door could help as a visual aid for players who are struggling to find where to go to progress if this method is used repeatedly throughout the game.
- Gameplay Programmer:
- Deciding how the door will open is important as it has to stay consistent throughout the game. This can be done by simply making the door open and close based on the player's proximity to the door, or it can be done by using a key or a code instead.
Blueprinting:
While designing my sliding doors, I ran into a few problems when trying to teleport the doors to the sides when the player enters the collision box. First, I had to figure out how to move both doors at the same time when the player approaches them. I eventually solved my issues by doubling the size of the X-axis for the collision so that it covers both doors instead of one. That way, the doors open at the same time whether I am in front of either door. Another issue I encountered was when my sliding doors didn't teleport the way I wanted it too. It would keep falling halfway through the floor and moving in the opposite direction (on the X-axis). I quickly solved my X-axis problem, but I was stumped on my door falling for a little while longer until I realized my mistake. I realized that the relative location of my Z axis wasn't the same so I placed the same number in both the beginning and ending overlap and voila, it was fixed. In the near future, I would like to learn how to animate the door, so that the door's movement slides smoothly instead of looking like it's teleporting. I also would like to add sound effects to my door to enhance the immersion of opening and closing the door.



Comments
Post a Comment