Game Development Reference
In-Depth Information
Let's discuss the implementation in detail. This method promises to have a control system
that looks more professional and is more fun for the player to deal with. At the beginning,
we have to have the character at the center of the camera view, then it starts to move, say,
to the right. When the character is at a specific relative distance from the camera on the x
axis, the camera begins to move right to follow it. Listing 7 shows the character following
mechanism. So let's create a new script called PlayerTracking and attach it to our camera.
Search WWH ::




Custom Search