EscapeRoom - Game Dev Log #2: What I got so far (part 1)

in #gamedev6 years ago

What have I done so far?

So the UnrealEngine is giving me a variety of objects already made by the makers of the engine. And of course I can make my own or download from the web (A good place can be free3d) but let us take what has been given to us and try and play with it, shall we?

This is the default chair from the engine, but what if I want it a bit different?

This is the same chair but with my changes to the material

So I started with just playing around... That is very nice but let's get things done! Last log I talked about opening a door when getting close to it, so let's see what I have done:

So basically, I have made an ordinary door. And to open it I need to understand how to reach the door's properties through my code and figure out how to open the door. After playing with the engine a bit and reading the docs I have understood each object has 3 properties I should be currently interested in: Pitch, Yaw and Roll. Pitch is like imagine if the door fell of by someone kicking it, Yaw is the rotation around itslef and Roll is the rotation of the door to the left and to the right (in the perspective of the picture above). So I now understand that I need to reach the Yaw property of the door (as it is what makes the door rotate like it should open). To do so I have used something known as FRotator.
OpenAngle at this case is 60.f, because I have found it to be comfortable and realistic.

Now I need to open the door when I get near it. I mentioned in my last log that I used something called 'Trigger Volume' and that is the square green thingy in the picture above. So it is fairly simple to use: I want to make it so if the player stands in the green square (the trigger volume) - open the door. The code is also simple becuase the trigger volume has a function called IsOverlappingActor, so I give the function the player and open the door with the code I showed before.

The final product of the code I mentioned above
Sort:  

I really like the way you write, you convey information effortlessly.

I need to work on my own writing skills.

Thank you very much, I appreciate it!!

The @OriginalWorks bot has determined this post by @taltalim102 to be original material and upvoted it!

ezgif.com-resize.gif

To call @OriginalWorks, simply reply to any post with @originalworks or !originalworks in your message!