Game Development Reference
In-Depth Information
Click the Camera icon to set up the camera zone. Reduce the camera zone to a
very small zone on the CameraControl actor, as shown in Figure 7-46.
Figure 7-46. Modified camera zone
Go back to the Scene Editor. Double-click the instance of CameraControl actor.
Click the lock icon to unlock the instance.
Drag and drop a Control Camera behavior into the actor.
Next, drag and drop a Constrain Attribute behavior and change
CameraControl.Motion.Linear Velocity.X to - Current Scene. Layers.Layer
1.Touch.Motion.Linear Velocity.X, as shown in Figure 7-47.
Figure 7-47. Moving the camera
You put a minus sign in front of the velocity value from Touch because you want
the camera to move in the opposite direction of the finger. If you move your
finger from right to left, you want to see what is on the right of the screen
(opposite direction).
Search WWH ::




Custom Search