Collision Issues

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By jonnte99


I am currently learning Godot and I am loving it so far. I have a couple of years of basic programming knowledge behind me so I am not completely new to programming. I have given myself the challenge of creating a very basic terraria clone as my learning project and have been fiddling with it for a couple of hours, following tutorials for the basic collision and player input. Everything worked fine until today when I started messing with the players sprite.

After i completed the setup of player sprites I started my game and the collision where off, very off. As soon as the player lands on a tile in my tilemap the screen starts shaking and the player is unable to jump. I turned on the collisionmaps in debug mode and they are behaving very wierd. The player collision box is “sinking” into the tile box for a split second and then popping back up, causing the shaking. I’ve been redoing the collisions a number of times and reviewing my code and I am unable to understand what is going on. If anyone could download my project from the link at the bottom and solving my problem or maybe propose a solution I would really appreciate it. I am totally stuck and can’t move forward.

I uploaded my project on You can download it here to check for yourself of how this problem behaves and review my files and setup: Deleted

I sincerely appreciate any help you guys are willing to give as I am really digging this engine and wan’t to learn and move forward.

Thanks in advance.

I added a new download link as my previous one would be invalid after one download. This one is valid for 1 week from today.

:bust_in_silhouette: Reply From: njamster

Select your Player-node from the tree and change the value under Collision > Safe Margin into 0.08. That is its default value. You might have set it to a lower value by accident. To find out what it does, take a look at the documentation.

You are awesome! At first I was confused as I checked the value in my player scene and it was 0.08 and it made no difference. Then I saw that it was changed to 0.01 in my root scene, which caused the problem. Such an easy solution.

Thanks a bunch!

jonnte99 | 2020-02-01 23:00