01: The Doors - no not the band!
Hello. I started making a Walking Simulator. It’s set in a house.
The first interaction I wanted to create was a door that opened when you pressed ‘E’. Initially, I just created a trigger box that would play a matinee actor that showed the door opening, however when I tested it out, this is the result I got:
This was the result of pivot point, not being where it should be because of the way I imported the door asset into the game. Part of the challenge with this Walking Simulator game is that I have no knowledge of 3D modelling at all and so I’m having to rely on found assets in order to create the game. Finding assets is fine (for this project, I’m using the furniture pack from Kenney), but a lot of the time when I import them into Unreal I run into a few issues.
Issue Number 1 - Whether or not to combine meshes.
As a lot of the models in the pack are the combination of a number of meshes, for example - a cabinet could have separate drawer, door meshes, should these be imported as 1 combined mesh or seperate? Well, I’m having to take this on a case by case basis. A bed for example, is probably fine to import combined as I won’t want any part of it to move, but I may want the player to be able to open a cabinet and so I would import these separately, so I could move the drawer/door on it’s own rather than moving the whole model.
Issue Number 2 - Transform Vertex to Absolute
When this was checked (by default), it would cause the pivot point of the model to be nowhere near the actual model itself. This is what caused the issue with the door movement above. If this is unchecked it sort of fixes this. I am aware that you can set the pivot point of objects in the editor, but even though I did this with the door object it still behaved strangely when playing a rotation in the matinee.
Issue Number 3 - Import Uniform Scale
When originally importing the assets, they were noticeably tiny. It took some trial and error to get this to be the correct size, which it turns out was 20, so when importing assets I needed to multiply their scale by 20 so that they looked the right size in game.
Bonus Issue: There was also a problem with materials. If I imported all of the models together, even though they referenced the same materials in the same folder, they would duplicate materials for each, meaning that for every object that used wood1 material I would have an individual material for wood1 rather than just one being used for each, so I had to import materials separately and then go through each static mesh and assign the correct materials to it. It took ages!
So anyway, the door finally rotated as it should do. I also went to the trouble of adding some help text that appears when the player enters the trigger box. It’s context sensitive as well, will tell the player to Open or Close the door depending on the state of the door. Here’s how it works:
When the player presses E it checks a gate which opens when the player enters the trigger box and closes when they leave. Entering and exiting the trigger box also toggles whether the floating text actor is hidden in game or not, which means it will only display when you’re close enough. If the player presses E when the gate is open, then it will flipflop between 2 actions. A: Play the door open animation and set text to say ‘Press E to Close’ and B: Reverse the door open animation and set text to say ‘Press E to Open’.
I’m not 100% happy with it as I’m not too sure on the floating text. I may move this so it appears on the wall next to the door handle, but at least the door doesn’t float through the wall anymore…
Remember to follow Scared Square Games on itch.io to get updates in your feed and follow me on Twitter for more regular micro-updates.
This is the End...
Untitled Walking Simulator Set In A House
I'm making a Walking Simulator!
Status | In development |
Author | Scared Square Games |
Genre | Adventure |
Tags | Exploration, First-Person, Narrative, Story Rich, Walking simulator |
Leave a comment
Log in with itch.io to leave a comment.