June 2018
Beginner to intermediate
298 pages
7h 38m
English
As with other physics bodies, KinematicBody2D needs a shape assigned to define its collision bounds. Add a CollisionShape2D object and create a new RectangleShape2D object inside it. When sizing the rectangle, you want it to reach the bottom of the image but not be quite as wide. In general, making the collision shape a bit smaller than the image will result in a better feel when playing, avoiding the experience of hitting something that looks like it wouldn't result in a collision.
You'll also need to offset the shape a small amount to make it fit. Setting Position to (0, 5) works well. When you're done, it should look approximately like this:
Read now
Unlock full access