CAGD 373 Game Scene Sprint 5

 

373 Group 3 Game Scene


    I am the programmer for Group 3, and we are building a game scene based off of the first-person shooter game Splitgate. Much of the inspiration of our level comes from the level "Oasis" in the game. Liam is my team lead, Ben, Preston, and Burak are our modelers, with Ben covering texturing as well.


Start of Sprint

    For sprint 5, I only completed a single card, however, it was a major step toward one of our epic cards, a cumulation of small steps to complete a broader task. This single card comprised of multiple scripts in C#, all related to getting this single feature working. This involved having our secondary camera properly track the players movement from the location of the other portal. To do this, I spent time trying to understand how to apply rotation properly within Unity. This inlvoved looking into quaternions.




    The above script calculates the difference between the player/camera and their portal, and applies it after Update() runs. This keeps the camera at the same distance as the player to properly show depth. I also have the angle difference between the two portals to properly have the camera always looking the correct direction. This helps add depth to the illusion of the portal.


End of Sprint

Now that the visuals for our portal have been completed, I began working on getting our player to actually teleport when they walked into it. To do this, I created colliders to act as triggers, which will tell our script when the player comes into contact with it. This will make our script change the players position.



    Using this boolean, our Update function can check if its touching the collider. Once it is, to stop walking into it the wrong way, we take the dot product of a vector3.up and the angle between the player and the collider. Once the player has moved over the collider and this value is negative, we try to place the player at the receiving portal collider, which is set up almost the exact same way.




    Above I mentioned that we are trying to teleport the player. However, I am running into a bug that is sending the player for a single frame, or rapidly back and forth if sitting on the collider properly. I believe this is tied to the components attached to the provided character controller prefab, and this upcoming sprint I plan to have this corrected, as well as moved on to my next task of implementing a simple melee mechanic into our game scene.

    I want to thank my other team member and my lead for the work they've put into this project these past few sprints. Our assets and features are starting to come together, and I look forward to getting everythying set up in Unity.



Comments

Popular Posts