Game Development Reference
In-Depth Information
Size
2
Element 0
X : 0
Y : 0
Z : 0
Element 1
X : 0
Y : 0
Z : 0
Parameters
Start Width
0.02
End Width
0.02
Use World Space
Uncheck
13. Then go back to the Hierarchy view and click on the robot object in the Hier-
archy view to go to its Inspector view and click on the Add Component button;
navigate to Scripts | Mouse Look (or we can drag the Mouse Look script here).
14. Go to Character Control (Script) in the Laser property and then set the LaserS-
cope object as follows:
Character Control (script)
Laser
LaserScope
Finally, we can click on play. We will see that the laser will turn on only when our
character is aiming. Also, the robot can rotate by moving the mouse. This is
shown in the following screenshot:
Search WWH ::




Custom Search