Game Development Reference
In-Depth Information
35.
}
36.}
Listing 17: The script that wraps the object around the scene if it leaves the view of the camera
Nothing new in these scripts except the wrapping step, which is as simple as modifying
the values of x or z in the position if they exceed the preset limits. After adding Target ,
AutoMover , and Wrapper to the cube that we want use as a target, we are now ready to
create a prefab for targets, which should allow us to add a number of targets to the scene.
Search WWH ::




Custom Search