The Godot Q&A is currently undergoing maintenance!

Your ability to ask and answer questions is temporarily disabled. You can browse existing threads in read-only mode.

We are working on bringing this community platform back to its full functionality, stay tuned for updates. | Twitter

0 votes


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:

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.

in Engine by (15 points)

1 Answer

+2 votes
Best answer

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.

by (10,634 points)
selected by

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!

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected] with your username.