Game Development Reference
In-Depth Information
Objective complete - mini debriefing
In this section, we created a MouseLook script to control the character's rotation while it
is aiming. Basically, this script will get the mouse's x or y axis multiplied by the sensitivity,
which will be used as a degree to control the rotation of our character.
Then, we added code in the CharacterControl script to toggle the MouseLook script
to enable or disable the character while the character is in an animation state. We also hid
and showed the laser scope.
Finally, we created the LaserScope object, which used the Line Renderer component to
draw a line on the screen.
Search WWH ::




Custom Search