Game Development Reference
In-Depth Information
Objective complete - mini debriefing
Basically, what we have done here is create the script to control our robot character. We ad-
ded the new aiming and shooting animation states to get the scene ready for the next step.
In this step, we added the script that will detect whether our character is walking or running
by increasing the value of the _moveSpeed parameter while we move our character or
hold the Shift key. On the other hand, we decrease the speed when we aren't moving.
We created the CameraAimingPosition object, which is the target position while our
character is aiming. We also have the script to switch our camera between aiming and nor-
mal movement, as shown in the following screenshot:
However, right now, we won't be able to rotate our character while it is aiming. So, in the
next step, we will add the MouseLook script and Laser target object to make our charac-
ter able to look around while aiming.
Search WWH ::




Custom Search