Game Development Reference
In-Depth Information
Making an immovable ground
When running the game, you will see that the camera now does indeed follow the cannon-
ball. However, there is only one problem—there is no "ground" and the cannonball just
falls to the bottom of the screen. So, let's make a "ground"! Add another sprite and resize it
to 1500 by 250 . Put this on a background layer. Let's give the background a blue col-
or—something that stands out. Check the following screenshot:
Add a Physics behavior to the ground sprite. Set Immovable to Yes and Prevent rotation
to Yes , as shown in the following screenshot. This will make this sprite immoveable.
Once you have done this, place the sprite near the bottom of the screen and set Opacity to
0 so that it's transparent. This is shown in the following screenshot:
Search WWH ::




Custom Search