mirror of
https://github.com/godotengine/godot.git
synced 2024-11-21 19:42:43 +00:00
Created tutorial_physics_2d (markdown)
parent
cb6c74312a
commit
2d37ef7133
21
tutorial_physics_2d.md
Normal file
21
tutorial_physics_2d.md
Normal file
@ -0,0 +1,21 @@
|
||||
# Physics & Collision (2D)
|
||||
|
||||
### Introduction
|
||||
|
||||
Our world is made of tangible matter. In our world, a piano can't go through a wall when going into a house. It needs to use the door. Video games are often like the the real world and Pac-Man can't go through the walls of his maze (although he can teleport from the left to the right side of the screen and back).
|
||||
|
||||
Anyway, moving sprites around is nice but one day they have to collide properly, so let's get to the point.
|
||||
|
||||
### Shape
|
||||
|
||||
The base collidable object in Godot's 2D world is a [Shape2D](class_shape2d). There are many types of shapes, all of them inherit this base class:
|
||||
|
||||
* [CircleShape2D](class_circleshape2d)
|
||||
* [RectangleShape2D](class_rectangleshape2d)
|
||||
* [CapsuleShape2D](class_capsuleshape2d)
|
||||
* [ConvexPolygonShape2D](class_convexpolygonshape2d)
|
||||
* [ConcavePolygonShape2D](class_concavepolygonshape2d)
|
||||
* etc. (there are others check the class list).
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user