564 Game Development and Simulation with Unreal Technology
13. Move the cone so the collision capsule is en tirely enc losed inside the cone when
viewed from above. We will worry about getting better collision detection later.
14. Save and compile the blueprint.
15. Your player should now lo ok like Figure 9.2( b).
SETTING UP THE CAMERA
In this stage of the process, we sh ould be ready to establish our camera. The
game we are aiming for is a top-down game. As such, the c amera is located
above the player and looking down. We will establish this camera system by
taking the following steps:
16. With the RotationCha r blueprint still open, perform the following tasks:
a. Click the down arrow in the Add Component box and search for Camera.
b. Select camera to add it to the compo nents section of the blueprin t.
c. Now search for the component Sprint Arm and add it to the blueprin t.
d. Next, you have to drag the camera onto the sp ring arm in the components
section to attach the camera to the spring arm.
e. Select the spring arm and rotate it 90 degrees so that it is now protruding
from the top of the cone object.
f. In the details panel with the spring arm still selected; change the value of the
Target Arm Length to 1000. Basically, the value controls the distance of
the camera from where the character is loca te d and can be changed to your
liking.
g. With the spring arm still selected under the transform section of the details
box, click on rotation and cha nge its value to world or absolute rota tion.
NOTE: If your camera is not attached at the end of the spring arm, you may
need to move the camera manually towards the end of the spring arm.
h. Compile the blueprint.
i. Save your progress so far.
SETTING UP THE PLAYER CONTROLLER
We w ill now need to set up our character controllers.
17. With the player’s blueprint still open, perform the following tasks – if you have
closed the blueprint, open it from the content browser:
a. Click the Defaults tab next to Compon ents tab.
b. In the searc h box type in auto possess.
c. Change the value fro m disabled to Player 0.
d. Compile and save.
18. Open the RotationController blueprint:
a. Check the boxes next to Show Mouse Cursor and Enable Click Events.
b. Change the default mouse cursor to crosshairs.
c. Compile and save the bluep rint.