Setup
This lab requires that you’ve at least completed the first page of Lab 7.
Do the following to prepare your Lab08
project:
-
Copy all your .h/.cpp files files from the
Lab07
folder to theLab08
folder, EXCEPT do not copy:- Block.h/cpp
- Bullet.h/cpp
- HUD.h/cpp
- SideBlock.h/cpp
(Make sure you copy using Finder or Explorer to copy files, don’t drag-and-drop within Visual Studio/Visual Studio Code as this will not copy properly)
-
Open your repo in Visual Studio or Visual Studio Code as usual
-
Now you need to change the build target from “Lab07” to “Lab08.” In Visual Studio (PC) this is via the dropdown near the play button. For Visual Studio Code (Mac), you should change both instances of “Lab07” on the bottom toolbar (one for the build target and the other for the run target)
-
Next, do the following:
- Remove any code that references deleted classes
- Remove any
PlaySound
calls and/orSoundHandle
s you added for Lab 7 sounds - Remove all the code in
PlayerMove::ProcessInput
- Remove everything in
PlayerMove::Update
except for follow camera code - For the follow camera code, change
HDist
= 60 andTargetOffset
= 50 and setVDist
= 70 (this is different from Lab 7, where we ignoredVDist
) - Remove the line of code that forces the z-position of the camera to always be 0.0f
- Remove every member variable from
PlayerMove.h
that was needed for Lab 7 specifically - In the Player constructor in Player.cpp:
- Change the mesh to
"Assets/Kart.gpmesh"
- Don’t create a
CollisionComponent
(we won’t have collision in this lab) - Set the scale of the actor to 0.75f
- Change the mesh to
You should now just see a single kart (it doesn’t move yet):
Now you’re ready for part 1 of the lab.