You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 58d7683
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: src/tutorials/platformer/part1.md
+7-6Lines changed: 7 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -92,12 +92,13 @@ clone it. Switch body type of the copy to `Dynamic`. Now change its sprite textu
92
92
Now for the player. As always, let's start by creating a new rigid body, adding a 2D collider to it, and setting its shape to capsule with the following
93
93
parameters - `Begin = 0.0, 0.0` and `End = 0.0, 0.3`. Add a 2D sprite (rectangle) to the rigid body and set its texture to
94
94
`data/characters/adventurer/adventurer-Sheet.png`. Set its uv rect to `(0.0, 0.0, 0.143, 0.091)` to see only one frame.
95
-
We also need a camera, otherwise, we won't see anything. Add it as a child to a player's rigid body. By default, our
96
-
camera will have no background, there'll be a black "void", this is not great and let's fix that. Select the camera
97
-
and set the `Skybox` property to `Some`. Now go to asset browser and find `data/background/BG.png`, drag'n'drop it to
98
-
the `Front` field of the `Skybox` property. Don't forget to adjust the far plane distance to something like `20.0`,
99
-
otherwise, you'll see just a portion of the background image. If everything is done correctly, you should get something like this:
100
-
95
+
We also need a camera, otherwise, we won't see anything. Add it as a child to a player's rigid body. By default, our
96
+
camera will have a default background, this is not great and let's fix that. Go to `File -> Current Scene Settings`
97
+
and set the `Skybox` property to `Some`. Now go to asset browser and find `data/background/BG.png`, drag'n'drop it to
98
+
the `Front` field of the `Skybox` property. Don't forget to adjust the far plane distance to something like `20.0` on the
99
+
camera, otherwise, you'll see just a portion of the background image. If everything is done correctly, you should get
100
+
something like this:
101
+
101
102

102
103
103
104
Save your scene by goint to `File -> Save Scene`. Now we can run the game using the `Play/Stop` button at the top of the
0 commit comments