Moving KenmaticBody on top of a not prefectly seamless TileSet

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Artium Nihamkin
:warning: Old Version Published before Godot 3 was released.

I have a TileSet with tiles that has StaticBody2D and CollisionPilygon2D.

Since the collision polygon is drawn by hand, the connection between the tile is not perfectly seamless. The right side of one tile might be higher than the left side of another.

In the main scene, I construct platforms out of these tiles.
The is also a Kinematic character with a collision polygon. I use the move function to move around and jump.

The problem is that because there are seams in the tiles, the character is stuck and can not move when on the ground.

Since platform game is rather common use-case of Godot, I guess I did something wrong.

enter image description here
enter image description here

:bust_in_silhouette: Reply From: DriNeo

Your grid is activated but you don’t use it. I suggest to anchor the shape corners on the grid to have more accuracy (look at the official tilemap tutorial ).
Then use a raycast as a collision shape for your kinematic body.

Thank you. After fixing the misalignment with the grid, I still had problems. Followed Kinematic character (2D) — Godot Engine (stable) documentation in English which cleared the issue for me. One note though, using raycast does not help and actually makes things worse. The technique described in the link above does not work with raycast. It took me some time to figure and switch back to rectangle.

Artium Nihamkin | 2017-12-30 20:08