September 2015
Beginner
286 pages
6h 17m
English
In this next script, instead of being random, we'll send Ethan to wherever we look. In Unity, this is accomplished by using ray casting—like shooting a ray from the camera and seeing what it hits (for more information, visit http://docs.unity3d.com/Manual/CameraRays.html).
We're going to create a new script, which will be attached to WalkTarget like before, as follows:
WalkTarget object in the Hierarchy panel or the Scene view.LookMoveTo.This should create a script component on the WalkTarget object. Double-click on it to open it in the MonoDevelop code editor.
Read now
Unlock full access