Amenti BGP Week 3
|
Hello again! Week 3 has finished and a lot of work has begun. The design is finished and all the members of the group have started to work with different artifacts in the game and the prototypes have started to become playable. My job this week was to finish the tutorial room that Lead Programmer Niclas did not have time to work on. The work I did was to make a pair of pillars move towards the wall when the player stood on a specific position. The process was pretty tedious because I lack knowledge in Unreal Engine. I made the script in blueprint visual scripting because we, the programmers, want to have the knowledge of both scripting and blueprint scripting so that we can teach each other what we know. The pillars were supposed to move to the wall and then become a door that opens so the player can walk through it. The problem that I had was that the movement was “easing-in” instead of going straight to the wall. I tried several different move nodes, but every one of them eased-in when they got close to the wall. On friday I solved it by noticing that several of the move nodes used the updated position of the pillar and then applied linear interpolation between the new position and the target position. This made the move node to never reach its target position. The solution was to save the start position and then interpolate between that and the target position. This made the pillar move with no easing and when I added a timeline node I could decide for how long the pillar was going to move. I set this to five seconds because that did not feel like too slow or too fast. After this worked I added the function that made the pillar only move while the player looked at the door. I made this because the puzzle itself is supposed to be a perspective puzzle where you have to look in a specific position to see the door in this example. I made this possible by making a Line Trace that started from the player and towards the players camera direction. The line trace sends out a line that collects data from objects that it intersects with. So in this example when the player stands on the eye in the tutorial room, the eye is the indication of a point of interest, the line trace starts to fire. When the player looks at something that is tagged with “Door” the program changes a boolean to true to indicate that the player is looking at the door. When this boolean is true the pillar starts to move and if the player looks away or steps off the eye the pillar stops. When the pillar has reached the wall, making the arch of the door, the door opens and the player can walk to the next puzzle. I also finished the tutorial for building a realistic room. |
